diff options
author | 2015-11-11 02:52:46 +0000 | |
---|---|---|
committer | 2015-11-11 02:52:46 +0000 | |
commit | 9b32031c48e1ad900fa787ce2c5170e5d734e355 (patch) | |
tree | 1e492a87268013d2ed10fb21d56c3825e60c6370 /usr.bin/patch/patch.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 'usr.bin/patch/patch.c')
-rw-r--r-- | usr.bin/patch/patch.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/patch/patch.c b/usr.bin/patch/patch.c index 259524f514c..63df8d43218 100644 --- a/usr.bin/patch/patch.c +++ b/usr.bin/patch/patch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: patch.c,v 1.60 2015/10/16 07:33:47 tobias Exp $ */ +/* $OpenBSD: patch.c,v 1.61 2015/11/11 02:52:46 deraadt Exp $ */ /* * patch - a program to apply diffs to original files @@ -148,8 +148,10 @@ main(int argc, char *argv[]) const char *tmpdir; char *v; - if (pledge("stdio rpath wpath cpath tmppath fattr", NULL) == -1) + if (pledge("stdio rpath wpath cpath tmppath fattr", NULL) == -1) { perror("pledge"); + exit(1); + } setvbuf(stdout, NULL, _IOLBF, 0); setvbuf(stderr, NULL, _IOLBF, 0); |