X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Ffork-child.c;h=e97f451bcec380b3b9fc6926c9beeeeadc3b417a;hb=07091751ffb7774332fbf4e1bdf103df83a0a554;hp=1acb28ad4227c270c063b09dc5938d5e7bf03101;hpb=abd8680d6efd97e7ba848a6392ee3ad72be18cd0;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/fork-child.c b/gdb/fork-child.c index 1acb28ad42..e97f451bce 100644 --- a/gdb/fork-child.c +++ b/gdb/fork-child.c @@ -46,11 +46,7 @@ extern char **environ; * the four arguments "a", "b", "c", "d". */ static void -breakup_args ( - scratch, - argv) - char *scratch; - char **argv; +breakup_args (char *scratch, char **argv) { char *cp = scratch; @@ -98,15 +94,9 @@ breakup_args ( or NULL if we should pick one. Errors reported with error(). */ void -fork_inferior (exec_file, allargs, env, traceme_fun, init_trace_fun, - pre_trace_fun, shell_file) - char *exec_file; - char *allargs; - char **env; - void (*traceme_fun) PARAMS ((void)); - void (*init_trace_fun) PARAMS ((int)); - void (*pre_trace_fun) PARAMS ((void)); - char *shell_file; +fork_inferior (char *exec_file, char *allargs, char **env, + void (*traceme_fun) (void), void (*init_trace_fun) (int), + void (*pre_trace_fun) (void), char *shell_file) { int pid; char *shell_command; @@ -254,13 +244,13 @@ fork_inferior (exec_file, allargs, env, traceme_fun, init_trace_fun, if (pre_trace_fun != NULL) (*pre_trace_fun) (); -#if defined(USG) && !defined(HAVE_VFORK) - pid = fork (); -#else +#ifdef HAVE_VFORK if (debug_fork) pid = fork (); else pid = vfork (); +#else + pid = fork (); #endif if (pid < 0) @@ -368,7 +358,7 @@ fork_inferior (exec_file, allargs, env, traceme_fun, init_trace_fun, correct program, and are poised at the first instruction of the new program. */ - /* Allow target dependant code to play with the new process. This might be + /* Allow target dependent code to play with the new process. This might be used to have target-specific code initialize a variable in the new process prior to executing the first instruction. */ TARGET_CREATE_INFERIOR_HOOK (pid); @@ -388,9 +378,7 @@ fork_inferior (exec_file, allargs, env, traceme_fun, init_trace_fun, clone will set it TRUE. */ void -clone_and_follow_inferior (child_pid, followed_child) - int child_pid; - int *followed_child; +clone_and_follow_inferior (int child_pid, int *followed_child) { extern int auto_solib_add; @@ -428,13 +416,13 @@ clone_and_follow_inferior (child_pid, followed_child) error ("error getting pipe for handoff semaphore"); /* Clone the debugger. */ -#if defined(USG) && !defined(HAVE_VFORK) - debugger_pid = fork (); -#else +#ifdef HAVE_VFORK if (debug_fork) debugger_pid = fork (); else debugger_pid = vfork (); +#else + debugger_pid = fork (); #endif if (debugger_pid < 0) @@ -512,8 +500,7 @@ clone_and_follow_inferior (child_pid, followed_child) /* Accept NTRAPS traps from the inferior. */ void -startup_inferior (ntraps) - int ntraps; +startup_inferior (int ntraps) { int pending_execs = ntraps; int terminal_initted;