Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii via Gdb-patches <gdb-patches@sourceware.org>
To: Mike Frysinger <vapier@gentoo.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] gnulib: import sys_wait
Date: Mon, 14 Jun 2021 15:18:09 +0300	[thread overview]
Message-ID: <834ke07i7y.fsf@gnu.org> (raw)
In-Reply-To: <20210613052519.19005-1-vapier@gentoo.org> (message from Mike Frysinger via Gdb-patches on Sun, 13 Jun 2021 01:25:19 -0400)

> Date: Sun, 13 Jun 2021 01:25:19 -0400
> From: Mike Frysinger via Gdb-patches <gdb-patches@sourceware.org>
> 
> +/* Native Windows API.  */
> +
> +# include <signal.h> /* for SIGTERM */
> +
> +/* The following macros apply to an argument x, that is a status of a process,
> +   as returned by waitpid() or, equivalently, _cwait() or GetExitCodeProcess().
> +   This value is simply an 'int', not composed of bit fields.  */
> +
> +/* When an unhandled fatal signal terminates a process, the exit code is 3.  */
> +# define WIFSIGNALED(x) ((x) == 3)
> +# define WIFEXITED(x) ((x) != 3)
> +# define WIFSTOPPED(x) 0
> +
> +/* The signal that terminated a process is not known posthum.  */
> +# define WTERMSIG(x) SIGTERM
> +
> +# define WEXITSTATUS(x) (x)
> +
> +/* There are no stopping signals.  */
> +# define WSTOPSIG(x) 0
> +
> +/* There are no core dumps.  */
> +# define WCOREDUMP(x) 0

AFAIU, this conflicts with what we have in gdbsupport/gdb_wait.h and
use in windows-nat.c and win32-low.cc.  Worse, the Gnulib emulation of
this for Windows is (IMNSHO) less useful, since it doesn't support any
abnormal termination except the equivalent of SIGABRT (which causes
the Windows runtime to exit with status = 3).  I tried to convince the
Gnulib folks to adopt a more useful emulation, similar to what we have
in gdb_wait.h, but AFAIR Bruno Haible rejected the idea.

Did you need this Gnulib module because those sims don't use
gdbsupport?  And if so, is it possible to somehow avoid clashes
between this Gnulib module and what we have in gdb_wait.h?

  reply	other threads:[~2021-06-14 12:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-13  5:25 Mike Frysinger via Gdb-patches
2021-06-14 12:18 ` Eli Zaretskii via Gdb-patches [this message]
2021-06-14 14:35   ` Mike Frysinger via Gdb-patches
2021-06-14 14:43     ` Eli Zaretskii via Gdb-patches
2021-06-14 19:35       ` Mike Frysinger via Gdb-patches
2021-06-30  7:03 ` Mike Frysinger via Gdb-patches
2021-08-18 16:19   ` Mike Frysinger via Gdb-patches
2021-09-04  1:15     ` Mike Frysinger via Gdb-patches
2021-09-03 20:54 ` Simon Marchi via Gdb-patches
2021-09-04  7:41   ` Mike Frysinger via Gdb-patches
2021-09-07 14:51     ` Simon Marchi via Gdb-patches
2021-09-08  0:55       ` Mike Frysinger via Gdb-patches
2021-09-08 14:41         ` Simon Marchi via Gdb-patches
2021-09-08 20:20           ` Mike Frysinger via Gdb-patches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=834ke07i7y.fsf@gnu.org \
    --to=gdb-patches@sourceware.org \
    --cc=eliz@gnu.org \
    --cc=vapier@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox