diff options
| -rw-r--r-- | source3/client/smbmount.c | 6 | 
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/client/smbmount.c b/source3/client/smbmount.c index 33adfc4d48..54970f7030 100644 --- 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 );  | 
