1130803Smarcel/* This testcase is part of GDB, the GNU debugger.
2130803Smarcel
3130803Smarcel   Copyright 2011-2023 Free Software Foundation, Inc.
4130803Smarcel
5130803Smarcel   This program is free software; you can redistribute it and/or modify
6130803Smarcel   it under the terms of the GNU General Public License as published by
7130803Smarcel   the Free Software Foundation; either version 3 of the License, or
8130803Smarcel   (at your option) any later version.
9130803Smarcel
10130803Smarcel   This program is distributed in the hope that it will be useful,
11130803Smarcel   but WITHOUT ANY WARRANTY; without even the implied warranty of
12130803Smarcel   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13130803Smarcel   GNU General Public License for more details.
14130803Smarcel
15130803Smarcel   You should have received a copy of the GNU General Public License
16130803Smarcel   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
17130803Smarcel
18130803Smarcel#include <unistd.h>
19130803Smarcel
20130803Smarcelstatic void
21130803Smarcelmarker () {}
22130803Smarcel
23130803Smarcelint
24130803Smarcelmain (void)
25130803Smarcel{
26130803Smarcel  int pid;
27130803Smarcel
28130803Smarcel  pid = vfork ();
29130803Smarcel  if (pid == -1)
30130803Smarcel    {
31130803Smarcel      return 1;
32130803Smarcel    }
33130803Smarcel  else if (pid != 0)
34130803Smarcel    {
35130803Smarcel    }
36130803Smarcel  else
37130803Smarcel    {
38130803Smarcel      _exit (0);
39130803Smarcel    }
40130803Smarcel
41130803Smarcel  pid = vfork ();
42130803Smarcel  if (pid == -1)
43130803Smarcel    {
44130803Smarcel      return 1;
45130803Smarcel    }
46130803Smarcel  else if (pid != 0)
47130803Smarcel    {
48130803Smarcel    }
49130803Smarcel  else
50130803Smarcel    {
51130803Smarcel      _exit (0);
52130803Smarcel    }
53130803Smarcel
54130803Smarcel  pid = vfork ();
55130803Smarcel  if (pid == -1)
56130803Smarcel    {
57130803Smarcel      return 1;
58130803Smarcel    }
59130803Smarcel  else if (pid != 0)
60130803Smarcel    {
61130803Smarcel    }
62130803Smarcel  else
63130803Smarcel    {
64130803Smarcel      _exit (0);
65130803Smarcel    }
66130803Smarcel
67130803Smarcel  marker ();
68130803Smarcel  return 0;
69130803Smarcel
70130803Smarcel}
71130803Smarcel