On 02/06/10 01:22, Roland McGrath wrote: > I am not convinced that this is worth doing. Any name from anywhere is > always just a guess at what might be the right file name. There will > always be cases where you can't manage to guess it. It is only a guess for > convenience when not secure, after all. With fexecve, there isn't even any > such file name to pass as a better guess than something derived from argv[0].
This is a big problem for the GLib's make check, since at that point the tests are not the tests but libtool shell scripts that check for $0 before calling the real binaries, and they have /dev/fd/N in $0 which makes them fail. There is probably other stuff for which this is problematic, although I agree this is not very common. You're right for fexecve, but that's not different from Linux (I've just checked and they pass /proc/self/fd/N). I think Marcus said on IRC that there was a chance this could be fixed, but even if I didn't understood him right and there's not, I think this is still an improvement over the status quo. Cheers, Emilio