diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-12-23 03:28:15 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-12-23 03:28:15 +0000 |
commit | 78e57f5d17406456eaa943b1f31f223847da4e39 (patch) | |
tree | d395db408069465af0251358521c6691fd07c3ac /usr.bin/nohup/nohup.c | |
parent | c747ea774e40af8fbe299c8ae09565102017f3a6 (diff) |
correct exit code handling; cje@kestrel.scs.uiuc.edu
Diffstat (limited to 'usr.bin/nohup/nohup.c')
-rw-r--r-- | usr.bin/nohup/nohup.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/nohup/nohup.c b/usr.bin/nohup/nohup.c index 26966ab8b35..9800bec031f 100644 --- a/usr.bin/nohup/nohup.c +++ b/usr.bin/nohup/nohup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nohup.c,v 1.4 1997/06/20 13:31:17 deraadt Exp $ */ +/* $OpenBSD: nohup.c,v 1.5 1997/12/23 03:28:14 deraadt Exp $ */ /* $NetBSD: nohup.c,v 1.6 1995/08/31 23:35:25 jtc Exp $ */ /* @@ -44,7 +44,7 @@ char copyright[] = #if 0 static char sccsid[] = "@(#)nohup.c 5.4 (Berkeley) 6/1/90"; #endif -static char rcsid[] = "$OpenBSD: nohup.c,v 1.4 1997/06/20 13:31:17 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: nohup.c,v 1.5 1997/12/23 03:28:14 deraadt Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -92,7 +92,7 @@ main(argc, argv) (void)signal(SIGHUP, SIG_IGN); execvp(argv[1], &argv[1]); - exit_status = (errno = ENOENT) ? EXIT_NOTFOUND : EXIT_NOEXEC; + exit_status = (errno == ENOENT) ? EXIT_NOTFOUND : EXIT_NOEXEC; (void)fprintf(stderr, "nohup: %s: %s\n", argv[1], strerror(errno)); exit(exit_status); } |