static int _dhcpcd_getentropy(void *, size_t);
static inline int _rs_allocate(struct _rs **, struct _rsx **);
+
+/* dhcpcd needs to hold onto the fd at fork due to privsep */
+#if 0
static inline void _rs_forkdetect(void);
+#else
+#define _rs_forkdetect()
+#define _rs_forkhandler()
+#endif
/* Inline "arc4random.h" */
#include <sys/types.h>
/* dhcpcd isn't multithreaded */
#define _ARC4_LOCK()
#define _ARC4_UNLOCK()
-#define _ARC4_ATFORK(f)
static int
_dhcpcd_getentropy(void *buf, size_t length)
raise(SIGKILL);
}
+#if 0
static volatile sig_atomic_t _rs_forked;
static inline void
memset(rs, 0, sizeof(*rs));
}
}
+#endif
static inline int
_rs_allocate(struct _rs **rsp, struct _rsx **rsxp)
return (-1);
}
- _ARC4_ATFORK(_rs_forkhandler);
+ _rs_forkhandler();
return (0);
}