summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2002-08-28 02:11:24 +0000
committerTim Potter <tpot@samba.org>2002-08-28 02:11:24 +0000
commitf1597ae9d1e724e33d1bd25e49f75a84beae6b89 (patch)
treedb9c33169c65b63069f9333bfd4d5231679e25fe
parentb42229c2d8f505470b7b5c1e0d74cf36438d6de7 (diff)
downloadsamba-f1597ae9d1e724e33d1bd25e49f75a84beae6b89.tar.gz
samba-f1597ae9d1e724e33d1bd25e49f75a84beae6b89.tar.bz2
samba-f1597ae9d1e724e33d1bd25e49f75a84beae6b89.zip
Some debugs for panic_action.
(This used to be commit 8f065f788b3af333c7c61236e33b6571b62b0c0d)
-rw-r--r--source3/lib/util.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index bf012b9721..377457a714 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -1140,8 +1140,18 @@ something really nasty happened - panic!
void smb_panic(char *why)
{
char *cmd = lp_panic_action();
+ int result;
+
if (cmd && *cmd) {
- system(cmd);
+ DEBUG(0, ("smb_panic(): calling panic action [%s]\n", cmd));
+ result = system(cmd);
+
+ if (result == -1)
+ DEBUG(0, ("smb_panic(): fork failed in panic action: %s\n",
+ strerror(errno)));
+ else
+ DEBUG(0, ("smb_panic(): action returned status %d\n",
+ WEXITSTATUS(result)));
}
DEBUG(0,("PANIC: %s\n", why));
dbgflush();