diff options
author | Chris Wilson <chris+github@qwirx.com> | 2008-08-03 07:06:50 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2008-08-03 07:06:50 +0000 |
commit | 50231c11a5c24d07f492e9c6b4915b7e3e33dd19 (patch) | |
tree | b3296097c476a9d93068e09587ff079e82ca809e /bin | |
parent | 444dd8c66ec4a5241d27be8e111c722f15ac35e0 (diff) |
Log the error code returned by NotifyScript.
Diffstat (limited to 'bin')
-rw-r--r-- | bin/bbackupd/BackupDaemon.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/bbackupd/BackupDaemon.cpp b/bin/bbackupd/BackupDaemon.cpp index ad8d2868..c8c77952 100644 --- a/bin/bbackupd/BackupDaemon.cpp +++ b/bin/bbackupd/BackupDaemon.cpp @@ -2473,10 +2473,11 @@ void BackupDaemon::NotifySysadmin(int Event) << script << "'"); // Then do it - if(::system(script.c_str()) != 0) + int returnCode = ::system(script.c_str()); + if (returnCode != 0) { - BOX_ERROR("Notify script returned an error code. ('" - << script << "')"); + BOX_ERROR("Notify script returned error code: " << + returnCode << " ('" << script << "')"); } // Flag that this is done so the administrator isn't constantly |