summaryrefslogtreecommitdiff
path: root/os-posix.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-01-02 14:10:38 -0500
committerpommicket <pommicket@gmail.com>2023-01-02 14:10:38 -0500
commitf791aa01fad7e81223808584212c6a1a4c80ca07 (patch)
treef93d53a62035cdad7f16b97fb28c83c7acfaf14f /os-posix.c
parentc0d0117a963cf8e4dfb28b919087d8a8ecbbca6e (diff)
finish restructuring
Diffstat (limited to 'os-posix.c')
-rw-r--r--os-posix.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/os-posix.c b/os-posix.c
index 5b37268..5b67836 100644
--- a/os-posix.c
+++ b/os-posix.c
@@ -1,4 +1,5 @@
#include "os.h"
+#include "util.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/wait.h>
@@ -178,7 +179,6 @@ Process *process_run_ex(const char *command, const ProcessSettings *settings) {
}
}
- bool success = false;
pid_t pid = fork();
if (pid == 0) {
// child process
@@ -295,6 +295,7 @@ void process_kill(Process *proc) {
waitpid(proc->pid, NULL, 0);
proc->pid = 0;
process_close_pipes(proc);
+ free(proc);
}
int process_check_status(Process *proc, char *message, size_t message_size) {