commit - 338c6432501e9c50a5fc03b8b2f917b54b8f5a0b
commit + dfc3de131c349a8677d4d4b885dc27f2b2f73567
blob - 4cf4ff425af3192b8125d8af958915f7620e0f4d
blob + 9239edfe11ca601a635dcf8977e188f7c1ccbac1
--- src/ngircd/ngircd.c
+++ src/ngircd/ngircd.c
}
/* New child process */
+#ifndef NeXT
(void)setsid( );
+#else
+ setpgrp(0, getpid());
+#endif
chdir( "/" );
/* Detach stdin, stdout and stderr */
blob - c48e67add1e47017b89a555371d9d197584f2bcd
blob + 125cc31a8e34fdde6043b3ced4095562472f6488
--- src/portab/Makefile.am
+++ src/portab/Makefile.am
noinst_LIBRARIES = libngportab.a
-libngportab_a_SOURCES = strdup.c strlcpy.c strtok_r.c vsnprintf.c
+libngportab_a_SOURCES = strdup.c strlcpy.c strtok_r.c vsnprintf.c waitpid.c
check_PROGRAMS = portabtest
blob - 83e11313d4ae3aa1ff555cd40ecf6eee1d40b514
blob + 56d4249b7509376144cde84524f29695b28c3ef2
--- src/portab/portab.h
+++ src/portab/portab.h
#endif
#endif
+#ifdef NeXT
+#define S_IRUSR 0000400 /* read permission, owner */
+#define S_IWUSR 0000200 /* write permission, owner */
+#define S_IRGRP 0000040 /* read permission, group */
+#define S_IROTH 0000004 /* read permission, other */
+#define ssize_t int
+#endif
+
#undef GLOBAL
#define GLOBAL
blob - /dev/null
blob + 0c169601df3fedebca97461cd04c6a2c0ba9ffdd (mode 644)
--- /dev/null
+++ src/portab/waitpid.c
+/*
+ * ngIRCd -- The Next Generation IRC Daemon
+ *
+ * waitpid() implementation. Public domain.
+ * Written by Steven D. Blackford for the NeXT system.
+ *
+ */
+
+#include "portab.h"
+
+#include "imp.h"
+#include <string.h>
+#include <stdlib.h>
+#include <sys/types.h>
+
+#include "exp.h"
+
+#ifndef HAVE_WAITPID
+
+GLOBAL int
+waitpid(pid, stat_loc, options)
+int pid, *stat_loc, options;
+{
+ for (;;) {
+ int wpid = wait(stat_loc);
+ if (wpid == pid || wpid == -1)
+ return wpid;
+ }
+}
+
+#endif