diff options
author | Frederic Culot <calcurse@culot.org> | 2007-08-04 14:34:03 +0000 |
---|---|---|
committer | Frederic Culot <calcurse@culot.org> | 2007-08-04 14:34:03 +0000 |
commit | ff60394c8e42d44e27dbde963db8b226d4cb164e (patch) | |
tree | 4fd58d2f27abf9690ecbd4ce2a72f9563813c649 /src/notify.c | |
parent | e6b1cf4b7ea80062a0ef575b97752b5de729b9e9 (diff) | |
download | calcurse-ff60394c8e42d44e27dbde963db8b226d4cb164e.tar.gz calcurse-ff60394c8e42d44e27dbde963db8b226d4cb164e.zip |
error handling while in ncurses mode improved
Diffstat (limited to 'src/notify.c')
-rwxr-xr-x | src/notify.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/notify.c b/src/notify.c index 86b6745..6033bcd 100755 --- a/src/notify.c +++ b/src/notify.c @@ -1,4 +1,4 @@ -/* $calcurse: notify.c,v 1.17 2007/07/29 20:59:09 culot Exp $ */ +/* $calcurse: notify.c,v 1.18 2007/08/04 14:34:03 culot Exp $ */ /* * Calcurse - text-based organizer @@ -124,16 +124,12 @@ launch_cmd(char *cmd, char *shell) pid = fork(); - if (pid < 0) { - fputs(_("FATAL ERROR in launch_cmd: could not fork\n"), - stderr); - exit(EXIT_FAILURE); - } else if (pid == 0) { /* Child: launch user defined command */ + if (pid < 0) + ierror(_("FATAL ERROR in launch_cmd: could not fork")); + else if (pid == 0) /* Child: launch user defined command */ if (execlp(shell, shell, "-c", cmd, (char *)NULL) < 0) - fputs(_("FATAL ERROR in launch_cmd: could not " - "launch user command\n"), stderr); - exit(EXIT_FAILURE); - } + ierror(_("FATAL ERROR in launch_cmd: could not " + "launch user command")); } /* |