mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-10 01:29:05 -04:00
Restore raise(SIGKILL) to execv error paths #636
This commit is contained in:
parent
aef66efb4e
commit
cc46571a43
@ -259,6 +259,7 @@ ncsubproc* ncsubproc_createv(ncplane* n, const ncsubproc_options* opts,
|
||||
if(ret->pid == 0){
|
||||
execv(bin, arg);
|
||||
//fprintf(stderr, "Error execv()ing %s\n", bin);
|
||||
raise(SIGKILL);
|
||||
exit(EXIT_FAILURE);
|
||||
}else if(ret->pid < 0){
|
||||
free(ret);
|
||||
@ -288,6 +289,7 @@ ncsubproc* ncsubproc_createvp(ncplane* n, const ncsubproc_options* opts,
|
||||
if(ret->pid == 0){
|
||||
execvp(bin, arg);
|
||||
//fprintf(stderr, "Error execv()ing %s\n", bin);
|
||||
raise(SIGKILL);
|
||||
exit(EXIT_FAILURE);
|
||||
}else if(ret->pid < 0){
|
||||
free(ret);
|
||||
@ -321,6 +323,7 @@ ncsubproc* ncsubproc_createvpe(ncplane* n, const ncsubproc_options* opts,
|
||||
execvpe(bin, arg, env);
|
||||
#endif
|
||||
//fprintf(stderr, "Error execv()ing %s\n", bin);
|
||||
raise(SIGKILL);
|
||||
exit(EXIT_FAILURE);
|
||||
}else if(ret->pid < 0){
|
||||
free(ret);
|
||||
|
Loading…
x
Reference in New Issue
Block a user