In perl.git, the branch smoke-me/ilmari/exec-empty-argv has been created

<http://perl5.git.perl.org/perl.git/commitdiff/ab5a6f1b2ee6bd9649d7b75a25396598a857687f?hp=0000000000000000000000000000000000000000>

        at  ab5a6f1b2ee6bd9649d7b75a25396598a857687f (commit)

- Log -----------------------------------------------------------------
commit ab5a6f1b2ee6bd9649d7b75a25396598a857687f
Author: Dagfinn Ilmari MannsÃ¥ker <[email protected]>
Date:   Sat Jul 22 19:32:40 2017 +0100

    [perl #131730] Fix exec PROGRAM LIST with empty LIST
    
    This should call execvp() with an empty argv array (containing only the
    terminating NULL pointer), but was instead just returning false (and not
    setting $!).
    
    Executing a program with an empty argv array is valid ISO C: it merely
    requires argc to be nonnegative and argv[argc] to be NULL.  POSIX states
    that that argv[0] "should point to a filename string that is associated
    with the process being started", but "should" only applies to
    applications claiming strict POSIX conformance.  Perl does not, and
    certainly should not impose it on perl programs.
    
    This also requires handling the case where both PROGRAM and LIST are
    empty, to avoid calling execvp(NULL, …), which _is_ invalid.  I've made
    it return ENOENT, which it the error POSIX specifies for execvp("", …).
-----------------------------------------------------------------------

--
Perl5 Master Repository

Reply via email to