pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/net/parpd
Module Name: pkgsrc
Committed By: manu
Date: Mon Jun 26 09:59:16 UTC 2017
Modified Files:
pkgsrc/net/parpd: Makefile distinfo
Added Files:
pkgsrc/net/parpd/patches: patch-parpd.c
Log Message:
Fix kqueue usage when forking in the background
This restores parpd functionnality on NetBSD 7.x
Submitted upstream as https://dev.marples.name/T127
To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 pkgsrc/net/parpd/Makefile
cvs rdiff -u -r1.8 -r1.9 pkgsrc/net/parpd/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/net/parpd/patches/patch-parpd.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/net/parpd/Makefile
diff -u pkgsrc/net/parpd/Makefile:1.13 pkgsrc/net/parpd/Makefile:1.14
--- pkgsrc/net/parpd/Makefile:1.13 Fri Mar 24 16:49:10 2017
+++ pkgsrc/net/parpd/Makefile Mon Jun 26 09:59:15 2017
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.13 2017/03/24 16:49:10 roy Exp $
+# $NetBSD: Makefile,v 1.14 2017/06/26 09:59:15 manu Exp $
#
DISTNAME= parpd-1.7
+PKGREVISION= 1
CATEGORIES= net
MASTER_SITES= ftp://roy.marples.name/pub/parpd/
MASTER_SITES+= http://roy.marples.name/downloads/parpd/
Index: pkgsrc/net/parpd/distinfo
diff -u pkgsrc/net/parpd/distinfo:1.8 pkgsrc/net/parpd/distinfo:1.9
--- pkgsrc/net/parpd/distinfo:1.8 Fri Mar 24 16:49:10 2017
+++ pkgsrc/net/parpd/distinfo Mon Jun 26 09:59:15 2017
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.8 2017/03/24 16:49:10 roy Exp $
+$NetBSD: distinfo,v 1.9 2017/06/26 09:59:15 manu Exp $
SHA1 (parpd-1.7.tar.xz) = 50fab1942ba2ab733a7664ee87d0791bac3e88cc
RMD160 (parpd-1.7.tar.xz) = d223a80ff5018579e4decf28183e9d448d2fd747
SHA512 (parpd-1.7.tar.xz) = d682d4ce012e87e0e9b051d96ead61f6dc273a0e193ea45f556e902924a7d02a25b7913af9ed779dced51ce658457f8308e71b34f7bba3adcf4be23973322b40
Size (parpd-1.7.tar.xz) = 18624 bytes
+SHA1 (patch-parpd.c) = 16978a037b420ba5b1f38a64b5d0b42b8c2cc7f7
Added files:
Index: pkgsrc/net/parpd/patches/patch-parpd.c
diff -u /dev/null pkgsrc/net/parpd/patches/patch-parpd.c:1.1
--- /dev/null Mon Jun 26 09:59:16 2017
+++ pkgsrc/net/parpd/patches/patch-parpd.c Mon Jun 26 09:59:16 2017
@@ -0,0 +1,46 @@
+$NetBSD: patch-parpd.c,v 1.1 2017/06/26 09:59:16 manu Exp $
+
+Submitted upstream as https://dev.marples.name/T127
+
+From 63d9d122d83dc358c6180d52187026f099ab6389 Mon Sep 17 00:00:00 2001
+From: Emmanuel Dreyfus <manu%netbsd.org@localhost>
+Date: Mon, 26 Jun 2017 11:38:39 +0200
+Subject: [PATCH] Fix kqueue usage when forking in the background
+
+NetBSD's kqueue(2) man page says "The queue is not inherited by a
+child created with fork(2)", which means the poll_fd needs to be
+reopen after forking in the background.
+
+This is done by calling eloop_requeue() after daemon().
+---
+ parpd.c | 14 +++++++++++---
+ 1 file changed, 11 insertions(+), 3 deletions(-)
+
+diff --git parpd.c parpd.c
+index a178696..dbf26c4 100644
+--- parpd.c
++++ parpd.c
+@@ -718,9 +718,17 @@ main(int argc, char **argv)
+ goto out;
+ }
+
+- if (!fflag && daemon(0, 0) == -1) {
+- syslog(LOG_ERR, "daemon: %m");
+- goto out;
++ if (!fflag) {
++ if (daemon(0, 0) == -1) {
++ syslog(LOG_ERR, "daemon: %m");
++ goto out;
++ }
++
++ /* At least for kqueue, poll_fd gets invalidated by fork */
++ if (eloop_requeue(eloop) == -1) {
++ syslog(LOG_ERR, "eloop_requeue after fork: %m");
++ goto out;
++ }
+ }
+
+ opt = eloop_start(eloop, &sigset);
+--
+2.11.0
+
Home |
Main Index |
Thread Index |
Old Index