git.samba.org
/
tprouty
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
82e4bb5
)
One more from waitpid() audit: Correctly interpret waitstatus when a
author
Martin Pool
<mbp@samba.org>
Wed, 15 Jan 2003 05:27:33 +0000
(
05:27
+0000)
committer
Martin Pool
<mbp@samba.org>
Wed, 15 Jan 2003 05:27:33 +0000
(
05:27
+0000)
child fails. Possibly this was causing smbmount to exit(0) when it
really should have indicated a failure.
source/client/smbmount.c
patch
|
blob
|
history
diff --git
a/source/client/smbmount.c
b/source/client/smbmount.c
index 33adfc4d488f92575d0cd2369751c8b0cf698401..54970f70309cd82cb1c1549b9eb74e042a806cc5 100644
(file)
--- a/
source/client/smbmount.c
+++ b/
source/client/smbmount.c
@@
-78,8
+78,12
@@
static void daemonize(void)
}
break;
}
+
/* If we get here - the child exited with some error status */
- exit(status);
+ if (WIFSIGNALLED(status))
+ exit(128 + WTERMSIG(status));
+ else
+ exit(WEXITSTATUS(status));
}
signal( SIGTERM, SIG_DFL );