[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: posix_spawnp() and PATH - change code or manual ?
Date: Wed, 6 May 2020 15:16:06 +0200
From: Martin Husemann <martin%duskware.de@localhost>
| Ok, but you can set PATH to : or something.
Not that, at least not to make posix_spawnp() work - that uses
strtok() to parse PATH, and that (apparently) never returns null
strings, and if it never returns anything, the sprintf that
sets fpath will never be executed, so posix_spawnp() will go on
to call posix_spawn() with a path that is just random uninitialised
junk from the stack.
Looks kind of broken to me.
But you could use PATH=. to (everywhere I think) get the effect of
not using PATH at all - it will try to exec "./name" instead of just "name"
but that difference should be benign.
It looks as if the consensus (such as it is) is to follow the manual
and adapt the code to suit.
I'll look at doing that (but there's been a kernel version bump since
my last build, so I'm going to need to recompile essentially everything
to do a release build to test the change - that will take a while to happen.)
Ie: there is still plenty of time for other opinions to be offered.
| We have a summer of code project that can cover this part.
Thanks for the info, which project is that, and who is mentoring it,
if you know? (I am woefully ignorant of everything related to GSoC).
Main Index |
Thread Index |