diff options
author | kaleb <empty> | 1993-09-21 17:58:25 +0000 |
---|---|---|
committer | kaleb <empty> | 1993-09-21 17:58:25 +0000 |
commit | 3dbf65a8de0d2d8668ca340208a33a654570b4ee (patch) | |
tree | 18384f28b115422a26e15b676b1428ef8b930e43 | |
parent | 61a0d1e2790ccd17ed4e756d82f5b7a87674f654 (diff) |
change to use config HasVFork, close xbug 5412
-rw-r--r-- | xc/programs/xinit/Imakefile | 9 | ||||
-rw-r--r-- | xc/programs/xinit/xinit.c | 23 |
2 files changed, 19 insertions, 13 deletions
diff --git a/xc/programs/xinit/Imakefile b/xc/programs/xinit/Imakefile index 4c4c81b8d..b8d030efd 100644 --- a/xc/programs/xinit/Imakefile +++ b/xc/programs/xinit/Imakefile @@ -1,5 +1,9 @@ -XCOMM $XConsortium: Imakefile,v 1.22 91/07/29 21:02:36 gildea Exp $ - DEFINES = ConnectionFlags $(SIGNAL_DEFINES) -DBINDIR=\"$(BINDIR)\" +XCOMM $XConsortium: Imakefile,v 1.23 93/05/28 11:46:47 rws Exp $ +#if HasVFork + VFORK_DEFINES = -DHAS_VFORK +#endif + DEFINES = ConnectionFlags $(VFORK_DEFINES) $(SIGNAL_DEFINES) \ + -DBINDIR=\"$(BINDIR)\" DEPLIBS = $(DEPXMULIB) $(DEPXLIB) LOCAL_LIBRARIES = $(XMULIB) $(XLIB) SRCS1 = xinit.c @@ -7,6 +11,7 @@ LOCAL_LIBRARIES = $(XMULIB) $(XLIB) SAMPLECONFIGS = xinitrc /* xserverrc */ PROGRAMS = xinit startx $(SAMPLECONFIGS) + ComplexProgramTarget_1(xinit,$(LOCAL_LIBRARIES),NullParameter) MakeScriptFromCpp(xinitrc, -DXINITDIR=$(XINITDIR)) diff --git a/xc/programs/xinit/xinit.c b/xc/programs/xinit/xinit.c index f95a19f36..e4ae8be46 100644 --- a/xc/programs/xinit/xinit.c +++ b/xc/programs/xinit/xinit.c @@ -1,4 +1,4 @@ -/* $XConsortium: xinit.c,v 11.54 91/12/23 17:26:08 gildea Exp $ */ +/* $XConsortium: xinit.c,v 11.55 93/09/20 17:56:55 hersh Exp $ */ /* Copyright Massachusetts Institute of Technology 1986 */ @@ -39,13 +39,13 @@ char **newenviron = NULL; #define SHELL "sh" #endif -#ifdef macII +#ifndef HAS_VFORK #define vfork() fork() -#endif /* macII */ - -#if defined(SYSV) && !defined(hpux) -#define vfork() fork() -#endif /* SYSV and not hpux */ +#else +#if defined(sun) && !defined(SVR4) +#include <vfork.h> +#endif +#endif /* A/UX setpgid incorrectly removes the controlling terminal. Per Posix, only setsid should do that. */ @@ -123,7 +123,8 @@ extern int errno; #endif -static shutdown(); +static void shutdown(); +static void set_environment(); #ifdef SIGNALRETURNSINT #define SIGVAL int @@ -160,7 +161,7 @@ sigUsr1(sig) #endif } -static Execute (vec) +static void Execute (vec) char **vec; /* has room from up above */ { execvp (vec[0], vec); @@ -518,7 +519,7 @@ static int ignorexio (dpy) } static -shutdown() +void shutdown() { /* have kept display opened, so close it now */ if (clientpid > 0) { @@ -571,7 +572,7 @@ shutdown() * make a new copy of environment that has room for DISPLAY */ -set_environment () +static void set_environment () { int nenvvars; char **newPtr, **oldPtr; |