* inftarg.c (child_thread_alive): New function to see if a
[deliverable/binutils-gdb.git] / gdb / fork-child.c
index 4fd5ee35748d9a5c890045ef994790fba64b9326..26b74cf416541e5045f92a18d1051d7b62ba40ef 100644 (file)
@@ -1,5 +1,5 @@
 /* Fork a Unix child process, and set up to debug it, for GDB.
-   Copyright 1990, 1991, 1992 Free Software Foundation, Inc.
+   Copyright 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
    Contributed by Cygnus Support.
 
 This file is part of GDB.
@@ -19,6 +19,7 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 #include "defs.h"
+#include <string.h>
 #include "frame.h"  /* required by inferior.h */
 #include "inferior.h"
 #include "target.h"
@@ -29,13 +30,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 #include <signal.h>
 
-#ifdef SET_STACK_LIMIT_HUGE
-#include <sys/time.h>
-#include <sys/resource.h>
-
-extern int original_stack_limit;
-#endif /* SET_STACK_LIMIT_HUGE */
-
 extern char **environ;
 
 #ifndef SHELL_FILE
@@ -199,17 +193,6 @@ fork_inferior (exec_file, allargs, env, traceme_fun, init_trace_fun,
       if (debug_setpgrp == -1)
         perror("setpgrp failed in child");
 
-#ifdef SET_STACK_LIMIT_HUGE
-      /* Reset the stack limit back to what it was.  */
-      {
-       struct rlimit rlim;
-
-       getrlimit (RLIMIT_STACK, &rlim);
-       rlim.rlim_cur = original_stack_limit;
-       setrlimit (RLIMIT_STACK, &rlim);
-      }
-#endif /* SET_STACK_LIMIT_HUGE */
-
       /* Ask the tty subsystem to switch to the one we specified earlier
         (or to share the current terminal, if none was specified).  */
 
@@ -276,6 +259,9 @@ startup_inferior (ntraps)
 
   terminal_initted = 0;
 
+#ifdef STARTUP_INFERIOR
+  STARTUP_INFERIOR (pending_execs);
+#else
   while (1)
     {
       stop_soon_quietly = 1;   /* Make wait_for_inferior be quiet */
@@ -309,5 +295,6 @@ startup_inferior (ntraps)
          resume (0, TARGET_SIGNAL_0);          /* Just make it go on */
        }
     }
+#endif /* STARTUP_INFERIOR */
   stop_soon_quietly = 0;
 }
This page took 0.023531 seconds and 4 git commands to generate.