From: "Maciej W. Rozycki" <macro@linux-mips.org>
To: Steve Ellcey <sellcey@imgtec.com>
Cc: Joel Brobecker <brobecker@adacore.com>,
gdb-patches@sourceware.org, Yao Qi <yao@codesourcery.com>,
Chen Gang <gang.chen@sunrus.com.cn>
Subject: Re: [Patch] Fix build problem with system call in compile/compile.c
Date: Wed, 07 Jan 2015 19:29:00 -0000 [thread overview]
Message-ID: <alpine.LFD.2.11.1501071858580.27020@eddie.linux-mips.org> (raw)
In-Reply-To: <1420655766.15691.44.camel@ubuntu-sellcey>
On Wed, 7 Jan 2015, Steve Ellcey wrote:
> > In that case, I have no objection to your patch either, provided
> > a small comment is added to explain why we allow ourselves to ignore
> > the return value (and since you'll be touching that code anyways,
> > I would also rename your variable to something more explicit, such
> > as "ignored" or "unused" for instance).
> >
> > Thank you,
>
> I am not sure why we allow ourselves to ignore the return value. Maybe
> we shouldn't. Chen Gang submitted a different patch where the return
> value is checked. Should we use that instead?
>
> https://sourceware.org/ml/gdb-patches/2015-01/msg00011.html
The best idea IMHO as well.
However I have concerns about this function overall in the first place.
GDB supports hosts that have no `rm' program. It may support (although
this I am less sure about) hosts that do not support the `system' C
library call in a way we are used to; specifically there may not be a
command processor available as noted in the ISO C document defining the
API.
Therefore I think it would be best to rewrite it to only use the relevant
C library calls like `remove' and `rmdir' to recursively remove a
directory; I wonder if actually we don't have something relevant already
available in libiberty or gnulib.
That of course does not mean we oughtn't to make a temporary fix to the
immediate problem discussed here, I certainly don't object that.
FWIW,
Maciej
next prev parent reply other threads:[~2015-01-07 19:29 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-06 0:44 Steve Ellcey
2015-01-06 3:09 ` Yao Qi
2015-01-06 4:16 ` Joel Brobecker
2015-01-06 16:04 ` Steve Ellcey
2015-01-07 4:14 ` Joel Brobecker
2015-01-07 18:36 ` Steve Ellcey
2015-01-07 19:01 ` Pedro Alves
2015-01-07 19:29 ` Maciej W. Rozycki [this message]
2015-01-07 19:35 ` Pedro Alves
2015-01-07 23:33 ` Maciej W. Rozycki
2015-01-08 21:12 ` Jan Kratochvil
2015-01-08 22:12 ` Steve Ellcey
2015-01-08 23:22 ` Pedro Alves
2015-01-09 0:10 ` Steve Ellcey
2015-01-09 3:47 ` Chen Gang S
2015-01-09 10:11 ` Pedro Alves
2015-01-09 10:46 ` Chen Gang S
2015-01-09 20:52 ` Chen Gang S
2015-01-09 21:53 ` Chen Gang S
2015-01-10 4:30 ` Joel Brobecker
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=alpine.LFD.2.11.1501071858580.27020@eddie.linux-mips.org \
--to=macro@linux-mips.org \
--cc=brobecker@adacore.com \
--cc=gang.chen@sunrus.com.cn \
--cc=gdb-patches@sourceware.org \
--cc=sellcey@imgtec.com \
--cc=yao@codesourcery.com \
/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).