aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/gnome-cal.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/gnome-cal.c')
-rw-r--r--calendar/gui/gnome-cal.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index af7b801f94..a7b5402e0d 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -8,6 +8,7 @@
#include <gnome.h>
#include <unistd.h>
#include <signal.h>
+#include <sys/wait.h>
#include "calendar.h"
#include "gnome-cal.h"
#include "gncal-full-day.h"
@@ -319,7 +320,7 @@ execute (char *command, int close_standard)
sigaction (SIGINT, &save_intr, NULL);
sigaction (SIGQUIT, &save_quit, NULL);
- for (i = (close_standard ? 0 : 3); i < 4096; i++)
+ for (i = (close_standard ? 0 : 3); i < top; i++)
close (i);
/* FIXME: As an excercise to the reader, copy the