diff options
author | 2015-11-11 02:52:46 +0000 | |
---|---|---|
committer | 2015-11-11 02:52:46 +0000 | |
commit | 9b32031c48e1ad900fa787ce2c5170e5d734e355 (patch) | |
tree | 1e492a87268013d2ed10fb21d56c3825e60c6370 /bin/csh/csh.c | |
parent | mark ehci_intr() as IPL_MPSAFE here as well (diff) | |
download | wireguard-openbsd-9b32031c48e1ad900fa787ce2c5170e5d734e355.tar.xz wireguard-openbsd-9b32031c48e1ad900fa787ce2c5170e5d734e355.zip |
exit() after perror() for pledge failure. Perhaps this got introduced
as a test idiom, either when pledge was young or during the transition
to strings.... dunno
Diffstat (limited to 'bin/csh/csh.c')
-rw-r--r-- | bin/csh/csh.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/csh/csh.c b/bin/csh/csh.c index 4d9001a47dd..09a34859054 100644 --- a/bin/csh/csh.c +++ b/bin/csh/csh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: csh.c,v 1.35 2015/10/28 22:18:53 naddy Exp $ */ +/* $OpenBSD: csh.c,v 1.36 2015/11/11 02:52:46 deraadt Exp $ */ /* $NetBSD: csh.c,v 1.14 1995/04/29 23:21:28 mycroft Exp $ */ /*- @@ -152,8 +152,10 @@ main(int argc, char *argv[]) (void) time(&chktim); if (pledge("stdio rpath wpath cpath fattr getpw proc exec tty", - NULL) == -1) + NULL) == -1) { perror("pledge"); + exit(1); + } /* * Move the descriptors to safe places. The variable didfds is 0 while we |