[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

fix for cda (xmcd)



When the SIGCHLD changes went into OpenBSD a few releases ago, cda
broke.  I did some debugging and couldn't find out exactly why it
was hanging (seems like it should have worked regardless) but using
SIG_DFL instead of SIG_IGN works around the problem.

 - todd

Index: patches/patch-cda_d_cda_c
===================================================================
RCS file: /cvs/ports/audio/xmcd/patches/patch-cda_d_cda_c,v
retrieving revision 1.2
diff -u -r1.2 patch-cda_d_cda_c
--- patches/patch-cda_d_cda_c	28 Mar 2003 22:39:10 -0000	1.2
+++ patches/patch-cda_d_cda_c	6 May 2003 18:39:23 -0000
@@ -1,6 +1,6 @@
 $OpenBSD: patch-cda_d_cda_c,v 1.2 2003/03/28 22:39:10 david Exp $
---- cda_d/cda.c.orig	Sat Feb  5 08:26:38 2000
-+++ cda_d/cda.c	Wed Aug  8 01:32:14 2001
+--- cda_d/cda.c.orig	Sat Feb  5 00:26:38 2000
++++ cda_d/cda.c	Tue May  6 12:36:11 2003
 @@ -349,23 +349,52 @@ cda_init(curstat_t *s)
  STATIC void
  cda_start(curstat_t *s)
@@ -92,6 +92,15 @@
  			(void) fprintf(errfp, "%s\n", emsgp);
  			return 1;
  		}
+@@ -3657,7 +3686,7 @@ cda_daemon(curstat_t *s)
+ 	MEM_FREE(emsgp);
+ #endif	/* NOMKTMPDIR */
+ 
+-	(void) signal(SIGCHLD, SIG_IGN);
++	(void) signal(SIGCHLD, SIG_DFL);
+ 
+ 	/* Become a daemon process */
+ 	switch (FORK()) {
 @@ -3817,12 +3846,14 @@ main(int argc, char **argv)
  	errfp = stderr;
  	s = &status;