diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-11-11 02:52:47 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-11-11 02:52:47 +0000 |
commit | fe9e8af8f3246e14a9eb585feb4d7f5aaa093855 (patch) | |
tree | 3281fbb5b5f5de11321c6825dd5a2c6d70e07068 /bin/ksh/main.c | |
parent | 0edf0956a8620a9cd461d3f081c92645c20c8b9e (diff) |
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/ksh/main.c')
-rw-r--r-- | bin/ksh/main.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/ksh/main.c b/bin/ksh/main.c index 301f6666de2..ea2e6714e1b 100644 --- a/bin/ksh/main.c +++ b/bin/ksh/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.73 2015/11/01 15:38:53 mmcc Exp $ */ +/* $OpenBSD: main.c,v 1.74 2015/11/11 02:52:46 deraadt Exp $ */ /* * startup, main loop, environments and error handling @@ -151,8 +151,10 @@ main(int argc, char *argv[]) #ifndef MKNOD if (pledge("stdio rpath wpath cpath fattr flock getpw proc exec tty", - NULL) == -1) + NULL) == -1) { perror("pledge"); + exit(1); + } #endif ainit(&aperm); /* initialize permanent Area */ |