Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Process API improvements (again) #1370

Merged
merged 18 commits into from
Apr 17, 2023

Conversation

takase1121
Copy link
Member

Here are some improvements on the process API based on ongoing work in #1178 which is quite huge.

This PR mostly concerns with errors returned by the process API and some type names.

src/api/process.c Outdated Show resolved Hide resolved
@takase1121
Copy link
Member Author

takase1121 commented Feb 13, 2023

I've suggested copying the cmd and environment variables, but effort on that have been stalled because it wasn't quite as efficient as I thought (on Windows). I propose merging as-is.

squash me

@takase1121 takase1121 force-pushed the PR/process-api-improvements branch from 8ab67c1 to 7350be1 Compare April 16, 2023 13:47
@takase1121 takase1121 force-pushed the PR/process-api-improvements branch from 7350be1 to 92662d9 Compare April 16, 2023 13:57
@jgmdev
Copy link
Member

jgmdev commented Apr 17, 2023

Merging this now, since it is well cook already and fixes #1470

@jgmdev jgmdev merged commit a3a1c5d into lite-xl:master Apr 17, 2023
@Guldoman
Copy link
Member

Was there any rush in merging this? At least let people involved in the discussion review things first...

For example, I'm wondering if there was a need to have the kill list in the registry, instead of having it inside the process metatable.

I'll review this properly tomorrow.

src/api/process.c Show resolved Hide resolved
src/api/process.c Show resolved Hide resolved
takase1121 added a commit to takase1121/lite-xl that referenced this pull request Aug 19, 2023
* feat(process): add push_error
* refactor(process): use push_error for better errors
* style(process): consistent error messages
* refactor(process): reimplement process.strerror() with push_error
* refactor(process): implement close_fd only once
* refactor(process): rename process_handle to process_handle_t
* fix(process): prevent errors from a NULL error message
* refactor(process): refactor push_error into 2 functions
* fix(process): fix wrong error message
* fix(process): check if push_error_string actually pushed something
* refactor(process): make error messages descriptive
* fix(process): check for empty table instead of aborting
* refactor(process): make error messages descriptive on Windows
* refactor(process): rename process_stream_handle to process_stream_t
* refactor(process): fix wrong usage of process_handle_t
* fix(process): fix wrong type name
* refactor(process): incoporate kill_list_thread into process_kill_list_t
* refactor(process): make kill_list per-state data
takase1121 added a commit to takase1121/lite-xl that referenced this pull request Aug 19, 2023
* feat(process): add push_error
* refactor(process): use push_error for better errors
* style(process): consistent error messages
* refactor(process): reimplement process.strerror() with push_error
* refactor(process): implement close_fd only once
* refactor(process): rename process_handle to process_handle_t
* fix(process): prevent errors from a NULL error message
* refactor(process): refactor push_error into 2 functions
* fix(process): fix wrong error message
* fix(process): check if push_error_string actually pushed something
* refactor(process): make error messages descriptive
* fix(process): check for empty table instead of aborting
* refactor(process): make error messages descriptive on Windows
* refactor(process): rename process_stream_handle to process_stream_t
* refactor(process): fix wrong usage of process_handle_t
* fix(process): fix wrong type name
* refactor(process): incoporate kill_list_thread into process_kill_list_t
* refactor(process): make kill_list per-state data
takase1121 added a commit to takase1121/lite-xl that referenced this pull request Aug 19, 2023
* feat(process): add push_error
* refactor(process): use push_error for better errors
* style(process): consistent error messages
* refactor(process): reimplement process.strerror() with push_error
* refactor(process): implement close_fd only once
* refactor(process): rename process_handle to process_handle_t
* fix(process): prevent errors from a NULL error message
* refactor(process): refactor push_error into 2 functions
* fix(process): fix wrong error message
* fix(process): check if push_error_string actually pushed something
* refactor(process): make error messages descriptive
* fix(process): check for empty table instead of aborting
* refactor(process): make error messages descriptive on Windows
* refactor(process): rename process_stream_handle to process_stream_t
* refactor(process): fix wrong usage of process_handle_t
* fix(process): fix wrong type name
* refactor(process): incoporate kill_list_thread into process_kill_list_t
* refactor(process): make kill_list per-state data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants