mirror of
https://github.com/lucannez64/darling-lol.git
synced 2026-10-27 19:54:38 +00:00
25 lines
1.0 KiB
Diff
25 lines
1.0 KiB
Diff
diff --git a/memberd-21.1/main.c b/memberd-21.1/main.c
|
|
index 8ce6514..87ac046 100644
|
|
--- a/memberd-21.1/main.c
|
|
+++ b/memberd-21.1/main.c
|
|
@@ -27,6 +27,7 @@
|
|
#include <stdio.h> // for fprintf(), stderr, et al
|
|
#include <unistd.h> // for getopt(), getpid(), select() et al.
|
|
#include <sys/stat.h>
|
|
+#include <signal.h> /* darling-lol M58F42: SIGPIPE guard */
|
|
#include <c.h>
|
|
#include <servers/bootstrap.h>
|
|
#include <sys/sysctl.h>
|
|
@@ -336,6 +337,11 @@ void ReadConfigFile(int* maxCache, int* defaultExpiration, int* defaultNegExpira
|
|
}
|
|
|
|
int main (int argc, char * const argv[]) {
|
|
+ /* darling-lol M58F42: ignore SIGPIPE (same class of defect as M58F40 for
|
|
+ * shellspawn). memberd is a launchd daemon that talks to clients over
|
|
+ * sockets; a peer closing mid-write otherwise raises SIGPIPE and kills the
|
|
+ * daemon under the default disposition, breaking the container bootstrap. */
|
|
+ signal(SIGPIPE, SIG_IGN);
|
|
const char * const argv0 = argv[0];
|
|
static const char * const argString = "dhvxsctru:g:lL";
|
|
char c;
|