This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFA: fix gdb_assert caused by 'catch signal ...' and fork
- From: Pedro Alves <palves at redhat dot com>
- To: Philippe Waroquiers <philippe dot waroquiers at skynet dot be>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 10 May 2013 18:20:15 +0100
- Subject: Re: RFA: fix gdb_assert caused by 'catch signal ...' and fork
- References: <1368136582 dot 30058 dot 7 dot camel at soleil>
Hi Philippe,
(Please mark newer posts/revisions of patches in new threads
with v2, v3, etc. in the subject line.)
> Index: gdb/testsuite/gdb.base/catch-signal-fork.c
> ===================================================================
> RCS file: gdb/testsuite/gdb.base/catch-signal-fork.c
> diff -N gdb/testsuite/gdb.base/catch-signal-fork.c
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ gdb/testsuite/gdb.base/catch-signal-fork.c 9 May 2013 21:46:36 -0000
> @@ -0,0 +1,58 @@
> +/* This testcase is part of GDB, the GNU debugger.
> +
> + Copyright 2013-2013 Free Software Foundation, Inc.
Write only "2013" when we only have a single year.
But, if the file is based on another existing file, we should
preserve the existing file's copyright years in the new file.
> +int
> +main ()
> +{
> + int i;
> + signal (SIGHUP, handle);
> +
> + raise (SIGHUP); /* first HUP */
> +
> + signal (SIGCHLD, handle);
> + for (i = 0; i < 3; i++) /* fork loop */
> + {
> + switch (fork())
> + {
> + case -1:
> + perror ("fork");
> + exit (1);
> + case 0:
> + exit (0);
> + }
> + (void) wait(NULL);
Missing space before parens. (do you really need the cast?)
> Index: gdb/testsuite/gdb.base/catch-signal-fork.exp
> ===================================================================
> RCS file: gdb/testsuite/gdb.base/catch-signal-fork.exp
> diff -N gdb/testsuite/gdb.base/catch-signal-fork.exp
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ gdb/testsuite/gdb.base/catch-signal-fork.exp 9 May 2013 21:46:36 -0000
> @@ -0,0 +1,43 @@
> +# Copyright 2013-2013 Free Software Foundation, Inc.
2013-2013 again.
--
Pedro Alves