Displaying 2 results from an estimated 2 matches for "dont_fork".
Did you mean:
do_fork
2009 Nov 25
1
[PATCH] daemon/Win32: Windows can't daemonize.
...uestfsd.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c
index 40b3c2f..d3b754d 100644
--- a/daemon/guestfsd.c
+++ b/daemon/guestfsd.c
@@ -335,10 +335,15 @@ main (int argc, char *argv[])
/* Fork into the background. */
if (!dont_fork) {
+#ifndef WIN32
if (daemon (0, 1) == -1) {
perror ("daemon");
exit (EXIT_FAILURE);
}
+#else /* WIN32 */
+ fprintf (stderr, "On Windows the daemon does not support forking into the background.\nYou *must* run the daemon with the -f option.\n");
+ e...
2009 Nov 20
1
fix new failures from latest-from-gnulib syntax-check
...message which indicates that
@@ -304,7 +304,7 @@ main (int argc, char *argv[])
xdr_uint32_t (&xdr, &len);
if (xwrite (sock, lenbuf, sizeof lenbuf) == -1)
- exit (1);
+ exit (EXIT_FAILURE);
xdr_destroy (&xdr);
@@ -312,14 +312,14 @@ main (int argc, char *argv[])
if (!dont_fork) {
if (daemon (0, 1) == -1) {
perror ("daemon");
- exit (1);
+ exit (EXIT_FAILURE);
}
}
/* Enter the main loop, reading and performing actions. */
main_loop (sock);
- exit (0);
+ exit (EXIT_SUCCESS);
}
/* Read /proc/cmdline. */
diff --git a/daemo...