diff options
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ChangeLog | 4 | ||||
-rw-r--r-- | shell/main.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index 6ce4fdc8b1..4f852dff4b 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,7 @@ +2007-05-28 Jules Colding <colding@omesc.com> + + * main.c (main): Prevent dup2() and close() on -1 + 2007-05-13 Matthew Barnes <mbarnes@redhat.com> * e-shell.c (impl_Shell_handleURI): diff --git a/shell/main.c b/shell/main.c index 0ecdff13b5..9667b862f8 100644 --- a/shell/main.c +++ b/shell/main.c @@ -541,7 +541,7 @@ main (int argc, char **argv) int fd; fd = g_open (evolution_debug_log, O_WRONLY | O_CREAT | O_TRUNC, 0600); - if (fd) { + if (fd != -1) { dup2 (fd, STDOUT_FILENO); dup2 (fd, STDERR_FILENO); close (fd); |