From f1597ae9d1e724e33d1bd25e49f75a84beae6b89 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Wed, 28 Aug 2002 02:11:24 +0000 Subject: Some debugs for panic_action. (This used to be commit 8f065f788b3af333c7c61236e33b6571b62b0c0d) --- source3/lib/util.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'source3/lib/util.c') 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(); -- cgit