Restore raise(SIGKILL) to execv error paths #636

pull/665/head
nick black 4 years ago
parent aef66efb4e
commit cc46571a43
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -259,6 +259,7 @@ ncsubproc* ncsubproc_createv(ncplane* n, const ncsubproc_options* opts,
if(ret->pid == 0){ if(ret->pid == 0){
execv(bin, arg); execv(bin, arg);
//fprintf(stderr, "Error execv()ing %s\n", bin); //fprintf(stderr, "Error execv()ing %s\n", bin);
raise(SIGKILL);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
}else if(ret->pid < 0){ }else if(ret->pid < 0){
free(ret); free(ret);
@ -288,6 +289,7 @@ ncsubproc* ncsubproc_createvp(ncplane* n, const ncsubproc_options* opts,
if(ret->pid == 0){ if(ret->pid == 0){
execvp(bin, arg); execvp(bin, arg);
//fprintf(stderr, "Error execv()ing %s\n", bin); //fprintf(stderr, "Error execv()ing %s\n", bin);
raise(SIGKILL);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
}else if(ret->pid < 0){ }else if(ret->pid < 0){
free(ret); free(ret);
@ -321,6 +323,7 @@ ncsubproc* ncsubproc_createvpe(ncplane* n, const ncsubproc_options* opts,
execvpe(bin, arg, env); execvpe(bin, arg, env);
#endif #endif
//fprintf(stderr, "Error execv()ing %s\n", bin); //fprintf(stderr, "Error execv()ing %s\n", bin);
raise(SIGKILL);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
}else if(ret->pid < 0){ }else if(ret->pid < 0){
free(ret); free(ret);

Loading…
Cancel
Save