about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
-rw-r--r--README2
-rw-r--r--client.c2
-rw-r--r--image.c2
-rw-r--r--merge.c2
-rw-r--r--meta.c2
-rw-r--r--server.c11
-rw-r--r--torus.12
-rw-r--r--torus.h2
8 files changed, 17 insertions, 8 deletions
diff --git a/README b/README
index 743a4e6..67c4dcc 100644
--- a/README
+++ b/README
@@ -39,7 +39,7 @@ DESCRIPTION
      -h      Write help page data to standard output and exit.
 
      -p pidfile
-             Daemonize and write PID to pidfile.
+             Daemonize and write PID to pidfile.  Only available on FreeBSD.
 
      -s sock
              Set path to UNIX-domain socket.  The default path is torus.sock.
diff --git a/client.c b/client.c
index de10060..7e41b5f 100644
--- a/client.c
+++ b/client.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2018  Curtis McEnroe <june@causal.agency>
+/* Copyright (C) 2018  June McEnroe <june@causal.agency>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as published by
diff --git a/image.c b/image.c
index e363afb..d67706f 100644
--- a/image.c
+++ b/image.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2018  Curtis McEnroe <june@causal.agency>
+/* Copyright (C) 2018  June McEnroe <june@causal.agency>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as published by
diff --git a/merge.c b/merge.c
index 997f97f..ce5dbef 100644
--- a/merge.c
+++ b/merge.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2017  Curtis McEnroe <june@causal.agency>
+/* Copyright (C) 2017  June McEnroe <june@causal.agency>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as published by
diff --git a/meta.c b/meta.c
index 90577d1..ff80bd1 100644
--- a/meta.c
+++ b/meta.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2017  Curtis McEnroe <june@causal.agency>
+/* Copyright (C) 2017  June McEnroe <june@causal.agency>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as published by
diff --git a/server.c b/server.c
index a62b286..cff6d21 100644
--- a/server.c
+++ b/server.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2017  Curtis McEnroe <june@causal.agency>
+/* Copyright (C) 2017  June McEnroe <june@causal.agency>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as published by
@@ -19,7 +19,6 @@
 #include <err.h>
 #include <errno.h>
 #include <fcntl.h>
-#include <libutil.h>
 #include <signal.h>
 #include <stdbool.h>
 #include <stdint.h>
@@ -34,6 +33,10 @@
 #include <time.h>
 #include <unistd.h>
 
+#ifdef __FreeBSD__
+#include <libutil.h>
+#endif
+
 #include "torus.h"
 
 static struct Tile *tiles;
@@ -371,11 +374,13 @@ int main(int argc, char *argv[]) {
 		}
 	}
 
+#ifdef __FreeBSD__
 	struct pidfh *pid = NULL;
 	if (pidPath) {
 		pid = pidfile_open(pidPath, 0600, NULL);
 		if (!pid) err(EX_CANTCREAT, "%s", pidPath);
 	}
+#endif
 
 	tilesMap(dataPath);
 
@@ -390,11 +395,13 @@ int main(int argc, char *argv[]) {
 	error = bind(server, (struct sockaddr *)&addr, SUN_LEN(&addr));
 	if (error) err(EX_CANTCREAT, "%s", sockPath);
 
+#ifdef __FreeBSD__
 	if (pid) {
 		error = daemon(0, 0);
 		if (error) err(EX_OSERR, "daemon");
 		pidfile_write(pid);
 	}
+#endif
 
 	error = listen(server, 0);
 	if (error) err(EX_OSERR, "listen");
diff --git a/torus.1 b/torus.1
index 6bad6be..cf4f702 100644
--- a/torus.1
+++ b/torus.1
@@ -101,6 +101,8 @@ Write help page data to standard output and exit.
 .It Fl p Ar pidfile
 Daemonize and write PID to
 .Ar pidfile .
+Only available on
+.Fx .
 .
 .It Fl s Ar sock
 Set path to UNIX-domain socket.
diff --git a/torus.h b/torus.h
index d469014..41c662b 100644
--- a/torus.h
+++ b/torus.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2017  Curtis McEnroe <june@causal.agency>
+/* Copyright (C) 2017  June McEnroe <june@causal.agency>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as published by