Follow-up Comment #12, bug #28934 (project hurd):

The patch looks good, but I have a couple of suggestions.

In __execve you cannot just call _hurd_exec_file_name unconditionally
since all exec() variants end up as a __execve().  For instance,
if there is both `/bin/foo' and `./foo', execpv("foo", { "foo", 0 })
will expand to execve("/bin/foo", { "foo", 0 }, ...), which expands to
_hurd_exec_file_name(file, { "foo", 0 }, ...), which will make the exec
server think you meant `./foo'.  Instead, you should actually test with
strcmp whether FILE_NAME and ARGV[0] are one and the same.

Also I think you should have a flags argument to _hurd_exec_generic
instead of a boolean, pass along the EXEC_FILE_NAME flag, and
perhaps rename the function to _hurd_exec_flags.  You could even drop
_hurd_exec_file_name all together then, though you would have to move out
the #ifdef EXEC_FILE_NAME to the callers, so perhaps its worth keeping...

Regards,
  Fredrik


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?28934>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



Reply via email to