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.
This commit is contained in:
parent
8a7d7dcc49
commit
cb6daaeec9
3 changed files with 22 additions and 8 deletions
|
@ -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
|
DISTNAME= vmpsd-1.3
|
||||||
PKGNAME= openvmps-1.3
|
PKGNAME= openvmps-1.3
|
||||||
PKGREVISION= 1
|
PKGREVISION= 2
|
||||||
CATEGORIES= net
|
CATEGORIES= net
|
||||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=vmps/}
|
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=vmps/}
|
||||||
|
|
||||||
|
|
|
@ -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
|
SHA1 (vmpsd-1.3.tar.gz) = 39a8f925191690f209d9f1609321f20360810cf1
|
||||||
RMD160 (vmpsd-1.3.tar.gz) = 1185fbd654d5d0e939fdfa08149d1ebcb3fc0ef2
|
RMD160 (vmpsd-1.3.tar.gz) = 1185fbd654d5d0e939fdfa08149d1ebcb3fc0ef2
|
||||||
Size (vmpsd-1.3.tar.gz) = 95202 bytes
|
Size (vmpsd-1.3.tar.gz) = 95202 bytes
|
||||||
SHA1 (patch-aa) = 3ee69eb84f9e2f4277eaaaeefd164ae6511f6fc9
|
SHA1 (patch-aa) = 03618ae72addfe881745a0bb94f7943b8c4cb749
|
||||||
SHA1 (patch-ab) = a30282863432d654669643103de3711da6d53620
|
SHA1 (patch-ab) = a30282863432d654669643103de3711da6d53620
|
||||||
SHA1 (patch-ac) = c5871b991808ca33d9ad0a7ee89ea1f1a4b0e803
|
SHA1 (patch-ac) = c5871b991808ca33d9ad0a7ee89ea1f1a4b0e803
|
||||||
SHA1 (patch-ad) = 7fa3bf093f35264b1b10003fb3747fd736d12c5d
|
SHA1 (patch-ad) = 7fa3bf093f35264b1b10003fb3747fd736d12c5d
|
||||||
|
|
|
@ -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.orig 2004-07-24 02:46:49.000000000 +0200
|
||||||
+++ daemon.c
|
+++ daemon.c 2006-05-30 23:12:09.000000000 +0200
|
||||||
@@ -14,8 +14,6 @@
|
@@ -14,8 +14,6 @@
|
||||||
#define VMPS_CHECK_BSD
|
#define VMPS_CHECK_BSD
|
||||||
#endif
|
#endif
|
||||||
|
@ -11,13 +11,27 @@ $NetBSD: patch-aa,v 1.2 2006/03/14 01:32:00 joerg Exp $
|
||||||
#ifdef VMPS_CHECK_BSD
|
#ifdef VMPS_CHECK_BSD
|
||||||
#include <sys/file.h>
|
#include <sys/file.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
@@ -44,6 +42,9 @@ daemon_start(ignsigcld)
|
@@ -44,6 +42,15 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
register int childpid;
|
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
|
+#ifdef VMPS_CHECK_BSD
|
||||||
+ int fd;
|
+ int fd;
|
||||||
+#endif
|
+#endif
|
||||||
|
|
||||||
#ifdef SIGTTOU
|
#ifdef SIGTTOU
|
||||||
signal(SIGTTOU, SIG_IGN);
|
signal(SIGTTOU, SIG_IGN);
|
||||||
|
@@ -91,6 +98,7 @@
|
||||||
|
if ( childpid > 0 ) exit(0);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
+#endif /* !NetBSD */
|
||||||
|
|
||||||
|
errno = 0;
|
||||||
|
umask(0);
|
||||||
|
|
Loading…
Reference in a new issue