if exec fails, perror() and _exit(). exit() is no good, because if

the child runs the atexit cleanup() function, the filesystems get
unmounted and things lose.
This commit is contained in:
marc 1999-03-11 16:48:27 +00:00
parent dbe02b9472
commit a08745a0e8

View File

@ -1,4 +1,4 @@
/* $NetBSD: run.c,v 1.9 1999/03/09 19:30:00 he Exp $ */
/* $NetBSD: run.c,v 1.10 1999/03/11 16:48:27 marc Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@ -319,6 +319,10 @@ launch_subwin(actionwin, args, win, display)
fclose(script);
}
execvp(argzero, origargs);
/* the parent will see this as the output from the
child */
perror("execvp");
_exit(EXIT_FAILURE);
} break; /* end of child */
default: break;
}