diff options
-rw-r--r-- | usr.bin/sendbug/sendbug.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/sendbug/sendbug.c b/usr.bin/sendbug/sendbug.c index 1e71303a359..82d740bebd7 100644 --- a/usr.bin/sendbug/sendbug.c +++ b/usr.bin/sendbug/sendbug.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sendbug.c,v 1.17 2007/03/25 23:21:11 ray Exp $ */ +/* $OpenBSD: sendbug.c,v 1.18 2007/03/25 23:23:29 ray Exp $ */ /* * Written by Ray Lai <ray@cyth.net>. @@ -179,7 +179,7 @@ editit(char *tmpfile) if ((ed = getenv("EDITOR")) == (char *)0) ed = _PATH_VI; if (asprintf(&p, "%s %s", ed, tmpfile) == -1) - return (0); + return (-1); argp[2] = p; top: @@ -195,7 +195,7 @@ editit(char *tmpfile) if (saved_errno == EPROCLIM) { warnx("you have too many processes"); free(p); - return (0); + return (-1); } if (saved_errno == EAGAIN) { sleep(1); @@ -203,7 +203,7 @@ editit(char *tmpfile) } perror("fork"); free(p); - return (0); + return (-1); } if (pid == 0) { (void)signal(SIGHUP, SIG_DFL); @@ -224,8 +224,8 @@ editit(char *tmpfile) (void)signal(SIGINT, SIG_DFL); (void)signal(SIGQUIT, SIG_DFL); if (!WIFEXITED(stat) || WEXITSTATUS(stat) != 0) - return (0); - return (1); + return (-1); + return (0); } int |