summaryrefslogtreecommitdiff
path: root/src/callproc.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2012-09-16 18:02:11 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2012-09-16 18:02:11 -0700
commiteeceac9312792b15bbafea16dec45a6b7d1312cc (patch)
treeb1f3baf864d0785bdc6ec8ea8ad24d8544d1de32 /src/callproc.c
parent78f83752f50a2aa9944e60a5aceac4015eb3ca58 (diff)
downloademacs-eeceac9312792b15bbafea16dec45a6b7d1312cc.tar.gz
Remove no-longer-needed Solaris 2.4 vfork bug workaround.
The workaround was for improving performance on Solaris 2.4, but is getting in the way now. Emacs will still work if someone is still running Solaris 2.4 in a museum somewhere; Sun dropped support for Solaris 2.4 in 2003. * configure.ac (ac_cv_func_vfork_works): Default to 'no' on Solaris 2.4, so that AC_FUNC_VFORK doesn't think vfork works. * src/callproc.c (Fcall_process) [HAVE_WORKING_VFORK]: * src/process.c (create_process) [HAVE_WORKING_VFORK]: Omit now-unnecessary workaround for the Solaris 2.4 vfork bug, since Emacs no longer uses vfork on that platform.
Diffstat (limited to 'src/callproc.c')
-rw-r--r--src/callproc.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/callproc.c b/src/callproc.c
index 9171337ee76..2604d295f3e 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -496,11 +496,6 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
register char **save_environ = environ;
register int fd1 = fd[1];
int fd_error = fd1;
-#ifdef HAVE_WORKING_VFORK
- sigset_t procmask;
- sigset_t blocked;
- struct sigaction sigpipe_action;
-#endif
if (fd_output >= 0)
fd1 = fd_output;
@@ -587,17 +582,6 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
0, current_dir);
#else /* not WINDOWSNT */
-#ifdef HAVE_WORKING_VFORK
- /* On many hosts (e.g. Solaris 2.4), if a vforked child calls `signal',
- this sets the parent's signal handlers as well as the child's.
- So delay all interrupts whose handlers the child might munge,
- and record the current handlers so they can be restored later. */
- sigemptyset (&blocked);
- sigaddset (&blocked, SIGPIPE);
- sigaction (SIGPIPE, 0, &sigpipe_action);
- pthread_sigmask (SIG_BLOCK, &blocked, &procmask);
-#endif
-
BLOCK_INPUT;
/* vfork, and prevent local vars from being clobbered by the vfork. */
@@ -645,9 +629,6 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
/* GConf causes us to ignore SIGPIPE, make sure it is restored
in the child. */
signal (SIGPIPE, SIG_DFL);
-#ifdef HAVE_WORKING_VFORK
- pthread_sigmask (SIG_SETMASK, &procmask, 0);
-#endif
child_setup (filefd, fd1, fd_error, (char **) new_argv,
0, current_dir);
@@ -655,12 +636,6 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
UNBLOCK_INPUT;
-#ifdef HAVE_WORKING_VFORK
- /* Restore the signal state. */
- sigaction (SIGPIPE, &sigpipe_action, 0);
- pthread_sigmask (SIG_SETMASK, &procmask, 0);
-#endif
-
#endif /* not WINDOWSNT */
/* The MSDOS case did this already. */