summaryrefslogtreecommitdiffstats
path: root/daemon
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2009-11-25 14:59:30 +0000
committerRichard Jones <rjones@redhat.com>2009-11-25 16:28:26 +0000
commit8d0d8cd4a340dea6fd3d84ab5b361aa757d5e19e (patch)
treec3470b977e9b69b279543cfa15848cc82271bb8a /daemon
parentea99d9ec56e52758ea0d9f01a605fbc51ec95fba (diff)
downloadlibguestfs-8d0d8cd4a340dea6fd3d84ab5b361aa757d5e19e.tar.gz
libguestfs-8d0d8cd4a340dea6fd3d84ab5b361aa757d5e19e.tar.xz
libguestfs-8d0d8cd4a340dea6fd3d84ab5b361aa757d5e19e.zip
daemon/Win32: Windows can't daemonize.
Diffstat (limited to 'daemon')
-rw-r--r--daemon/guestfsd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c
index 40b3c2f3..d3b754d2 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");
+ exit (EXIT_FAILURE);
+#endif /* WIN32 */
}
/* Enter the main loop, reading and performing actions. */