From cb6daaeec94ffb363f8598e2b695194a5cc1e5f0 Mon Sep 17 00:00:00 2001 From: bouyer Date: Wed, 31 May 2006 17:47:45 +0000 Subject: [PATCH] On NetBSD use daemon() instead of the custom code here which forgets to close std*. Now it's possible to properly restart the daemon from a rsh/ssh command. Bump pkgrevision. --- net/openvmps/Makefile | 4 ++-- net/openvmps/distinfo | 4 ++-- net/openvmps/patches/patch-aa | 22 ++++++++++++++++++---- 3 files changed, 22 insertions(+), 8 deletions(-) diff --git a/net/openvmps/Makefile b/net/openvmps/Makefile index 6266298dae20..973fb57e24ec 100644 --- a/net/openvmps/Makefile +++ b/net/openvmps/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.3 2005/12/29 06:22:01 jlam Exp $ +# $NetBSD: Makefile,v 1.4 2006/05/31 17:47:45 bouyer Exp $ DISTNAME= vmpsd-1.3 PKGNAME= openvmps-1.3 -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= net MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=vmps/} diff --git a/net/openvmps/distinfo b/net/openvmps/distinfo index 8f0efd7fc495..32dfd8ae5092 100644 --- a/net/openvmps/distinfo +++ b/net/openvmps/distinfo @@ -1,9 +1,9 @@ -$NetBSD: distinfo,v 1.3 2006/03/14 01:32:00 joerg Exp $ +$NetBSD: distinfo,v 1.4 2006/05/31 17:47:45 bouyer Exp $ SHA1 (vmpsd-1.3.tar.gz) = 39a8f925191690f209d9f1609321f20360810cf1 RMD160 (vmpsd-1.3.tar.gz) = 1185fbd654d5d0e939fdfa08149d1ebcb3fc0ef2 Size (vmpsd-1.3.tar.gz) = 95202 bytes -SHA1 (patch-aa) = 3ee69eb84f9e2f4277eaaaeefd164ae6511f6fc9 +SHA1 (patch-aa) = 03618ae72addfe881745a0bb94f7943b8c4cb749 SHA1 (patch-ab) = a30282863432d654669643103de3711da6d53620 SHA1 (patch-ac) = c5871b991808ca33d9ad0a7ee89ea1f1a4b0e803 SHA1 (patch-ad) = 7fa3bf093f35264b1b10003fb3747fd736d12c5d diff --git a/net/openvmps/patches/patch-aa b/net/openvmps/patches/patch-aa index a5ca083113a1..109be04cfaeb 100644 --- a/net/openvmps/patches/patch-aa +++ b/net/openvmps/patches/patch-aa @@ -1,7 +1,7 @@ -$NetBSD: patch-aa,v 1.2 2006/03/14 01:32:00 joerg Exp $ +$NetBSD: patch-aa,v 1.3 2006/05/31 17:47:45 bouyer Exp $ ---- daemon.c.orig 2004-07-24 00:46:49.000000000 +0000 -+++ daemon.c +--- daemon.c.orig 2004-07-24 02:46:49.000000000 +0200 ++++ daemon.c 2006-05-30 23:12:09.000000000 +0200 @@ -14,8 +14,6 @@ #define VMPS_CHECK_BSD #endif @@ -11,13 +11,27 @@ $NetBSD: patch-aa,v 1.2 2006/03/14 01:32:00 joerg Exp $ #ifdef VMPS_CHECK_BSD #include #include -@@ -44,6 +42,9 @@ daemon_start(ignsigcld) +@@ -44,6 +42,15 @@ { register int childpid; ++#ifdef __NetBSD__ ++ if (daemon(0,0)) { ++ fprintf(stderr, "%s: can't daemon(): %s\n", ++ getprogname(), strerror(errno)); ++ } ++#else /* !__NetBSD__ */ +#ifdef VMPS_CHECK_BSD + int fd; +#endif #ifdef SIGTTOU signal(SIGTTOU, SIG_IGN); +@@ -91,6 +98,7 @@ + if ( childpid > 0 ) exit(0); + + #endif ++#endif /* !NetBSD */ + + errno = 0; + umask(0);