From: Mike Frysinger <vapier@gentoo.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] gnulib: import sys_wait
Date: Mon, 14 Jun 2021 10:35:07 -0400 [thread overview]
Message-ID: <YMdpGwJPJOBR/Efe@vapier> (raw)
In-Reply-To: <834ke07i7y.fsf@gnu.org>
On 14 Jun 2021 15:18, Eli Zaretskii wrote:
> > 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.
i don't think there's any conflicts. gdb* dirs probe the env w/out gnulib,
so they'll see sys/wait.h is not available, and then the gdb_wait.h and such
files will continue to be used.
> 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?
sim/ doesn't use gdbsupport/. the gdbsupport/ dir assumes it's used with
only gdb/, and is C++, so i don't think trying to generalize it is worth
the effort.
-mike
next prev parent reply other threads:[~2021-06-14 14:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-13 5:25 Mike Frysinger
2021-06-14 12:18 ` Eli Zaretskii
2021-06-14 14:35 ` Mike Frysinger [this message]
2021-06-14 14:43 ` Eli Zaretskii
2021-06-14 19:35 ` Mike Frysinger
2021-06-30 7:03 ` Mike Frysinger
2021-08-18 16:19 ` Mike Frysinger
2021-09-04 1:15 ` Mike Frysinger
2021-09-03 20:54 ` Simon Marchi
2021-09-04 7:41 ` Mike Frysinger
2021-09-07 14:51 ` Simon Marchi
2021-09-08 0:55 ` Mike Frysinger
2021-09-08 14:41 ` Simon Marchi
2021-09-08 20:20 ` Mike Frysinger
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=YMdpGwJPJOBR/Efe@vapier \
--to=vapier@gentoo.org \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).