From 7700434b5c52c609453111e16e49a2708d699041 Mon Sep 17 00:00:00 2001 From: Kevin Buettner Date: Sun, 8 Apr 2001 18:26:03 +0000 Subject: [PATCH] Add comments noting that vfork might be defined to be fork. --- gdb/ChangeLog | 7 +++++++ gdb/fork-child.c | 7 ++++++- gdb/ser-pipe.c | 4 ++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8085d06caba..deec137f2ac 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2001-04-08 Kevin Buettner + + * fork-child.c (fork_inferior, clone_and_follow_inferior): + Document fact that apparent call to vfork() might actually be + a call to fork() instead. + * ser-pipe.c (pipe_open): Likewise. + 2001-04-08 Kevin Buettner * printcmd.c (print_frame_args): Use a cleanup to invoke diff --git a/gdb/fork-child.c b/gdb/fork-child.c index a952d4f98d5..1c19b833870 100644 --- a/gdb/fork-child.c +++ b/gdb/fork-child.c @@ -253,6 +253,9 @@ fork_inferior (char *exec_file_arg, char *allargs, char **env, if (pre_trace_fun != NULL) (*pre_trace_fun) (); + /* Create the child process. Note that the apparent call to vfork() + below *might* actually be a call to fork() due to the fact that + autoconf will ``#define vfork fork'' on certain platforms. */ if (debug_fork) pid = fork (); else @@ -420,7 +423,9 @@ clone_and_follow_inferior (int child_pid, int *followed_child) if (status < 0) error ("error getting pipe for handoff semaphore"); - /* Clone the debugger. */ + /* Clone the debugger. Note that the apparent call to vfork() + below *might* actually be a call to fork() due to the fact that + autoconf will ``#define vfork fork'' on certain platforms. */ if (debug_fork) debugger_pid = fork (); else diff --git a/gdb/ser-pipe.c b/gdb/ser-pipe.c index 652d7743afa..3e232872301 100644 --- a/gdb/ser-pipe.c +++ b/gdb/ser-pipe.c @@ -65,6 +65,10 @@ pipe_open (serial_t scb, const char *name) if (socketpair (AF_UNIX, SOCK_STREAM, 0, pdes) < 0) return -1; + /* Create the child process to run the command in. Note that the + apparent call to vfork() below *might* actually be a call to + fork() due to the fact that autoconf will ``#define vfork fork'' + on certain platforms. */ pid = vfork (); /* Error. */ -- 2.30.2