gdb: Allow GDB to _not_ load a previous command history
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / foll-vfork-exit.c
index 3f5943d88dbe63188c6a1faaf1cc1428a8b3f38d..4219f40836a9159ab72a8cc7df329ddde2b7bdc6 100644 (file)
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 1997-2014 Free Software Foundation, Inc.
+   Copyright 1997-2020 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -23,7 +23,10 @@ main ()
 {
   int pid;
 
-  pid = vfork ();
+  /* A statement before vfork to make sure a breakpoint on main isn't
+     set on vfork below.  */
+  pid = 1;
+  pid = vfork (); /* VFORK */
   if (pid == 0)
     {
       printf ("I'm the child!\n");
This page took 0.025519 seconds and 4 git commands to generate.