2004-04-21 Boris Kovalenko <boris@tagnet.ru>
* daemon.c: (daemon) fix check for error return from setsid
diff --git a/lib/ChangeLog b/lib/ChangeLog
index ab2489d..121d1d6 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,3 +1,7 @@
+2004-04-21 Boris Kovalenko <boris@tagnet.ru>
+
+ * daemon.c: (daemon) fix check for error return from setsid
+
2004-01-19 Paul Jakma <paul@dishone.st>
* sigevent.{c,h}: New files, implement event handled signals.
diff --git a/lib/daemon.c b/lib/daemon.c
index dfd26b3..d838010 100644
--- a/lib/daemon.c
+++ b/lib/daemon.c
@@ -46,7 +46,7 @@
/* Become session leader and get pid. */
pid = setsid();
- if (pid < -1)
+ if (pid == -1)
{
perror ("setsid");
return -1;