Skip to content
This repository was archived by the owner on Mar 19, 2024. It is now read-only.

Commit

Permalink
At least attempt to cleanup after ourselves when we fork children
Browse files Browse the repository at this point in the history
  • Loading branch information
klange committed Sep 2, 2022
1 parent d3288c3 commit 155786b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bim.c
Original file line number Diff line number Diff line change
Expand Up @@ -4188,6 +4188,7 @@ int git_examine(char * filename) {
}

fclose(f);
waitpid(-1,NULL,WNOHANG);
return 0;
}

Expand Down Expand Up @@ -5205,6 +5206,7 @@ int _prefix_command_run_script(char * cmd) {
env->lines = remove_line(env->lines, env->line_no-1);
}
fclose(result);
waitpid(-1,NULL,WNOHANG);
env->loading = 0;

/* Return to the original buffer and replace the selected lines with the output */
Expand Down
1 change: 1 addition & 0 deletions bim.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <kuroko/vm.h>

#ifdef __DATE__
Expand Down

0 comments on commit 155786b

Please sign in to comment.