git.samba.org
/
idra
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3710ea2
)
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.
(This used to be commit
1e33083fe66dfc1e168ffeb2f9d87953534a2d5d
)
source3/client/smbmount.c
patch
|
blob
|
history
diff --git
a/source3/client/smbmount.c
b/source3/client/smbmount.c
index 33adfc4d488f92575d0cd2369751c8b0cf698401..54970f70309cd82cb1c1549b9eb74e042a806cc5 100644
(file)
--- a/
source3/client/smbmount.c
+++ b/
source3/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 );