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: Tue, 26 Sep 2017 17:00:18 +0200

On Tue, 2017-09-26 at 16:24 +0200, Samuel Thibault wrote:

> That should be “filename” instead of “file”.

Yes of course. That was merely a copy/paste error. Thanks for finding it.

> Take the case of PATH containing e.g. :bin: , and your current directory
> contains a bin directory which contains a script and you pass only the
> name of the script to spawni(). “file” would only contain the name
> of the script, while “filename” would contain ./bin/

Verified.

> In both cases you can just free(cwd) right after the asprintf call, to
> make the whole code simpler, and also make the cwd variable local to the
> corresponding blocks.

Fixed.

Attachment: submitted-exec_filename.diff
Description: Text Data


reply via email to

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