From 1780e6ac17c208d749deee31af541a04e3b123fe Mon Sep 17 00:00:00 2001 From: pommicket Date: Fri, 6 Jan 2023 18:25:44 -0500 Subject: check LSP process status --- os.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'os.h') diff --git a/os.h b/os.h index b7d189e..20135ff 100644 --- a/os.h +++ b/os.h @@ -123,10 +123,12 @@ long long process_read_stderr(Process *process, char *data, size_t size); // 1 if the process exited successfully // 0 if the process hasn't exited. // If message is not NULL, it will be set to a description of what happened (e.g. "exited successfully") -int process_check_status(Process *process, char *message, size_t message_size); +// if the process is no longer running, *process will be freed and set to NULL. +int process_check_status(Process **process, char *message, size_t message_size); // kills process if still running -// this also frees any resources used by `process`. -void process_kill(Process *process); +// this also frees any resources used by `*process`. +// *process will be set to NULL. +void process_kill(Process **process); #endif // OS_H_ -- cgit v1.2.3