Add check for vfork() to configure.in. Cleanup uses.
This commit is contained in:
parent
ab5ba170e9
commit
818fa2bf21
@ -1,3 +1,12 @@
|
|||||||
|
Sun Dec 3 02:28:26 2000 Andrew Cagney <cagney@b1.cygnus.com>
|
||||||
|
|
||||||
|
* ser-pipe.c (pipe_open): Only use vfork when available.
|
||||||
|
* fork-child.c (fork_inferior): Fix #ifdef HAVE_VFORK test.
|
||||||
|
(clone_and_follow_inferior): Ditto.
|
||||||
|
|
||||||
|
* configure.in (AC_CHECK_FUNCS): Check for vfork.
|
||||||
|
* configure, config.in: Regenerate.
|
||||||
|
|
||||||
Sun Dec 3 01:54:49 2000 Andrew Cagney <cagney@b1.cygnus.com>
|
Sun Dec 3 01:54:49 2000 Andrew Cagney <cagney@b1.cygnus.com>
|
||||||
|
|
||||||
* ser-unix.c (wait_for): Initialize the FD_SET before every select
|
* ser-unix.c (wait_for): Initialize the FD_SET before every select
|
||||||
|
@ -225,6 +225,9 @@
|
|||||||
/* Define if you have the strchr function. */
|
/* Define if you have the strchr function. */
|
||||||
#undef HAVE_STRCHR
|
#undef HAVE_STRCHR
|
||||||
|
|
||||||
|
/* Define if you have the vfork function. */
|
||||||
|
#undef HAVE_VFORK
|
||||||
|
|
||||||
/* Define if you have the <argz.h> header file. */
|
/* Define if you have the <argz.h> header file. */
|
||||||
#undef HAVE_ARGZ_H
|
#undef HAVE_ARGZ_H
|
||||||
|
|
||||||
|
2
gdb/configure
vendored
2
gdb/configure
vendored
@ -3557,7 +3557,7 @@ EOF
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
for ac_func in setpgid sbrk sigaction isascii bzero bcopy btowc poll sigprocmask
|
for ac_func in setpgid sbrk sigaction isascii bzero bcopy btowc poll sigprocmask vfork
|
||||||
do
|
do
|
||||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||||
echo "configure:3564: checking for $ac_func" >&5
|
echo "configure:3564: checking for $ac_func" >&5
|
||||||
|
@ -129,7 +129,7 @@ AC_HEADER_STAT
|
|||||||
|
|
||||||
AC_C_CONST
|
AC_C_CONST
|
||||||
|
|
||||||
AC_CHECK_FUNCS(setpgid sbrk sigaction isascii bzero bcopy btowc poll sigprocmask)
|
AC_CHECK_FUNCS(setpgid sbrk sigaction isascii bzero bcopy btowc poll sigprocmask vfork)
|
||||||
AC_FUNC_ALLOCA
|
AC_FUNC_ALLOCA
|
||||||
|
|
||||||
# See if machine/reg.h supports the %fs and %gs i386 segment registers.
|
# See if machine/reg.h supports the %fs and %gs i386 segment registers.
|
||||||
|
@ -244,13 +244,13 @@ fork_inferior (char *exec_file, char *allargs, char **env,
|
|||||||
if (pre_trace_fun != NULL)
|
if (pre_trace_fun != NULL)
|
||||||
(*pre_trace_fun) ();
|
(*pre_trace_fun) ();
|
||||||
|
|
||||||
#if defined(USG) && !defined(HAVE_VFORK)
|
#ifdef HAVE_VFORK
|
||||||
pid = fork ();
|
|
||||||
#else
|
|
||||||
if (debug_fork)
|
if (debug_fork)
|
||||||
pid = fork ();
|
pid = fork ();
|
||||||
else
|
else
|
||||||
pid = vfork ();
|
pid = vfork ();
|
||||||
|
#else
|
||||||
|
pid = fork ();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (pid < 0)
|
if (pid < 0)
|
||||||
@ -416,13 +416,13 @@ clone_and_follow_inferior (int child_pid, int *followed_child)
|
|||||||
error ("error getting pipe for handoff semaphore");
|
error ("error getting pipe for handoff semaphore");
|
||||||
|
|
||||||
/* Clone the debugger. */
|
/* Clone the debugger. */
|
||||||
#if defined(USG) && !defined(HAVE_VFORK)
|
#ifdef HAVE_VFORK
|
||||||
debugger_pid = fork ();
|
|
||||||
#else
|
|
||||||
if (debug_fork)
|
if (debug_fork)
|
||||||
debugger_pid = fork ();
|
debugger_pid = fork ();
|
||||||
else
|
else
|
||||||
debugger_pid = vfork ();
|
debugger_pid = vfork ();
|
||||||
|
#else
|
||||||
|
debugger_pid = fork ();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (debugger_pid < 0)
|
if (debugger_pid < 0)
|
||||||
|
@ -64,7 +64,11 @@ pipe_open (serial_t scb, const char *name)
|
|||||||
if (socketpair (AF_UNIX, SOCK_STREAM, 0, pdes) < 0)
|
if (socketpair (AF_UNIX, SOCK_STREAM, 0, pdes) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
#ifdef HAVE_VFORK
|
||||||
pid = vfork ();
|
pid = vfork ();
|
||||||
|
#else
|
||||||
|
pid = fork ();
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Error. */
|
/* Error. */
|
||||||
if (pid == -1)
|
if (pid == -1)
|
||||||
|
Loading…
Reference in New Issue
Block a user