bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BUG: /proc/self/exe reports relative paths, should always return abs


From: Svante Signell
Subject: Re: BUG: /proc/self/exe reports relative paths, should always return absolute paths?
Date: Thu, 21 Sep 2017 10:11:42 +0200

On Thu, 2017-09-21 at 09:39 +0200, Svante Signell wrote:
> On Thu, 2017-09-21 at 01:01 +0200, Samuel Thibault wrote:
> > Svante Signell, on mer. 20 sept. 2017 08:46:49 +0200, wrote:
> > > I changed the patch for __execve() to keep file_name if the path is
> > > absolute
> > > and
> > > call realpath() for relative paths.
> > 
> > But then if you call a script that looks at $0 from a relative path,
> > it'll break.
> > 
> > > (I did also a getcwd() version, but that does not seem to be needed, and
> > > using
> > > realpath() is simpler.)
> > 
> > It's simpler but doesn't work in the case above.
> 
> New patch attached. Better now?

Sorry. Now I've built glibc successfully.
Should this warning be fixed with a cast too?
../sysdeps/mach/hurd/execve.c: In function ‘__execve’:
../sysdeps/mach/hurd/execve.c:42:16: warning: assignment discards ‘const’
qualifier from pointer target type [-Wdiscarded-qualifiers]

Attachment: submitted-exec_filename.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]