summaryrefslogtreecommitdiffstats
path: root/usr.bin/sendbug/sendbug.c
diff options
context:
space:
mode:
authorray <ray@openbsd.org>2007-03-26 06:47:00 +0000
committerray <ray@openbsd.org>2007-03-26 06:47:00 +0000
commit648f0ffc1171a29ebe8dc6ac2d99c3832977d766 (patch)
tree3295004ee107d7db4384ff29597cbf3085b78915 /usr.bin/sendbug/sendbug.c
parentDon't print warnings in editit(), instead make errno reliable on (diff)
downloadwireguard-openbsd-648f0ffc1171a29ebe8dc6ac2d99c3832977d766.tar.xz
wireguard-openbsd-648f0ffc1171a29ebe8dc6ac2d99c3832977d766.zip
Certain errors in editit() should be fatal.
Diffstat (limited to 'usr.bin/sendbug/sendbug.c')
-rw-r--r--usr.bin/sendbug/sendbug.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/sendbug/sendbug.c b/usr.bin/sendbug/sendbug.c
index 424f12b3fff..b98dc94d62f 100644
--- a/usr.bin/sendbug/sendbug.c
+++ b/usr.bin/sendbug/sendbug.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sendbug.c,v 1.27 2007/03/26 06:40:01 ray Exp $ */
+/* $OpenBSD: sendbug.c,v 1.28 2007/03/26 06:47:00 ray Exp $ */
/*
* Written by Ray Lai <ray@cyth.net>.
@@ -133,7 +133,8 @@ main(int argc, char *argv[])
mtime = sb.st_mtime;
edit:
- editit(tmppath);
+ if (editit(tmppath) == -1 && errno != ECHILD)
+ err(1, "error running editor");
if (stat(tmppath, &sb) == -1)
err(1, "stat");