summaryrefslogtreecommitdiff
path: root/wm/uwm/patches/patch-aj
blob: 9fc3aa7e8d00bcb30b60c6e1551776ed92776ff9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
$NetBSD: patch-aj,v 1.2 2005/12/06 15:57:22 joerg Exp $

--- Menu.c.orig	Sat Oct  1 18:41:13 1988
+++ Menu.c	Mon Jan 17 22:09:10 2000
@@ -72,6 +72,10 @@ Bool alternateGC = True;	/* true if only
 #define vfork() fork()
 #endif
 
+#ifdef X_NOT_STDC_ENV
+char *malloc();
+#endif
+
 /* the following procedure is a copy of the implementation of system, 
  * modified to reset the handling of SIGINT, SIGQUIT, and SIGHUP before
  * exec-ing
@@ -84,6 +88,14 @@ char *s;
 	char **oldenviron;
 	extern char **environ, **newenviron;
 
+#ifdef SIGCHLD
+	/*
+	 * Children are now handled in uwm.c, but make sure
+	 * uwm blocks :-) for compatibility with other systems.
+	 */
+
+	signal(SIGCHLD, SIG_DFL);
+#endif
 	oldenviron = environ;
 	environ = newenviron;
 	if ((pid = vfork()) == 0) {
@@ -107,6 +119,9 @@ char *s;
 		status = -1;
 	signal(SIGINT, istat);
 	signal(SIGQUIT, qstat);
+#ifdef SIGCHLD
+	clear_children();
+#endif
 	return(status);
 }
 
@@ -129,7 +144,6 @@ MenuInfo *menu;
     char *hlname;			/* Pointer to hi-liter name. */
     char *strbuf;			/* String buffer for IsTextNL. */
     Bool checkMotion = TRUE;		/* To Restore Cursor Position */
-    char *malloc();
     int funcbutton;			/* function button for window select */
 
     /*