#ifdef __APPLE__
int run_as_child = 0;
/* Needed for Mac OS X fork/exec */
+#else
+ time_t netif_time = 0; /* Time since last network update */
#endif /* __APPLE__ */
#if HAVE_LAUNCHD
int launchd_idle_exit;
for (i = 0; i < limit.rlim_cur && i < 1024; i ++)
close(i);
+
+ /*
+ * Redirect stdin/out/err to /dev/null...
+ */
+
+ open("/dev/null", O_RDONLY);
+ open("/dev/null", O_WRONLY);
+ open("/dev/null", O_WRONLY);
#endif /* DEBUG */
}
current_time = time(NULL);
+#ifndef __APPLE__
+ /*
+ * Update the network interfaces once a minute...
+ */
+
+ if ((current_time - netif_time) >= 60)
+ {
+ netif_time = current_time;
+ NetIFUpdate = 1;
+ }
+#endif /* !__APPLE__ */
+
#if HAVE_LAUNCHD
/*
* If no other work was scheduled and we're being controlled by launchd