Mercurial > hg
diff mcabber/src/main.c @ 676:80d4959422ca
New "eventcmd_checkstatus" option
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Thu, 26 Jan 2006 23:14:17 +0100 |
parents | fed6d1e4d7a9 |
children | ee03b56b93ee |
line wrap: on
line diff
--- a/mcabber/src/main.c Wed Jan 25 22:00:06 2006 +0100 +++ b/mcabber/src/main.c Thu Jan 26 23:14:17 2006 +0100 @@ -122,6 +122,15 @@ pid_t pid; do { pid = waitpid (WAIT_ANY, &status, WNOHANG); + // Check the exit status value if 'eventcmd_checkstatus' is set + if (settings_opt_get_int("eventcmd_checkstatus")) { + if (pid > 0) { + // exit status 2 -> beep + if (WIFEXITED(status) && WEXITSTATUS(status) == 2) { + scr_Beep(); + } + } + } } while (pid > 0); //if (pid < 0) // scr_LogPrint(LPRINT_LOGNORM, "Error in waitpid: errno=%d", errno);