This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch: fix gdb_gcore.sh failure in ash/dash


> Date: Sat, 17 Sep 2005 17:58:30 -0400
> From: Daniel Jacobowitz <drow@false.org>
> 
> On Fri, Sep 09, 2005 at 07:11:13PM -0700, Qunying Pan wrote:
> > Hi,
> > 
> > Running gdb_gcore.sh in ash/dash fails with message "Hangup detected on 
> > fd 0". The following patch fixes the problem. Acceptable?
> 
> Let's just use a tempfile.  This patch also makes one other change in
> behavior: it uses gdb from $PATH instead of hardcoding /usr/bin, since
> I needed that to test it and it seems more reasonable.
> 
> Anyone have comments on this patch?

I think using a temporary file is a good idea, but if I read your
patch correctly, it seems the temporary file is created in the current
directory, which might not be writable.

Another problem is that the name is predictable, which is a potential
security risk.  Assuming mktemp(1) is available is probably not a good
idea, but it'd be nice to use it if it's avaiable.

Mark


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]