Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@is.elta.co.il>
To: Joel Brobecker <brobecker@ACT-Europe.FR>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] Should openp open directories?
Date: Thu, 18 Apr 2002 08:17:00 -0000	[thread overview]
Message-ID: <Pine.SUN.3.91.1020418191239.8613E-100000@is> (raw)
In-Reply-To: <20020418122535.B11802@act-europe.fr>


On Thu, 18 Apr 2002, Joel Brobecker wrote:

> 2002-04-18  Joel Brobecker  <brobecker@gnat.com>
> 
>         * source.c (is_regular_file): New function.
>         (openp): Check wether file to open is a regular file
>         to avoid opening directories.

I think this change is a good idea, but I have one comment: if stat 
fails, isn't it better to return non-zero?  Yes, I know: it shouldn't 
happen, but if we return non-zero in that case, we keep 
back-compatibility in case there are some obscure filesystems when that 
could happen.

Also, did you try your patch when there's a directory by that name, but 
no executable program?  If so, what does the patched GDB say and/or do?


  reply	other threads:[~2002-04-18 15:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-18  3:25 Joel Brobecker
2002-04-18  8:17 ` Eli Zaretskii [this message]
2002-04-19  2:18   ` Joel Brobecker
2002-04-19  2:54     ` Eli Zaretskii
2002-04-22  4:00       ` Joel Brobecker
2002-04-22 11:33         ` Eli Zaretskii
2002-04-23  4:09           ` 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=Pine.SUN.3.91.1020418191239.8613E-100000@is \
    --to=eliz@is.elta.co.il \
    --cc=brobecker@ACT-Europe.FR \
    --cc=gdb-patches@sources.redhat.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