emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Add shell-quasiquote.


From: David Kastrup
Subject: Re: [PATCH] Add shell-quasiquote.
Date: Thu, 22 Oct 2015 17:23:13 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

>> From: David Kastrup <address@hidden>
>> Cc: Eli Zaretskii <address@hidden>, address@hidden,
>> address@hidden, address@hidden
>> Date: Thu, 22 Oct 2015 14:47:26 +0200
>> 
>> [/bin/sh] is what "system" is supposed to run.
>
> Maybe I'm wrong, but my reading of Posix indicates that 'system' runs
> "sh" in an unspecified directory.

<URL:http://pubs.opengroup.org/onlinepubs/9699919799/>

    [CX] [Option Start] The system() function shall behave as if a child
    process were created using fork(), and the child process invoked the
    sh utility using execl() as follows:

    execl(<shell path>, "sh", "-c", command, (char *)0);

    where <shell path> is an unspecified pathname for the sh utility.
    [...]

Well, you're quite right.  It's not even necessary that the executable
file in the unspecified directory is actually called "sh" as long as it
is called with argv[0] being "sh".

-- 
David Kastrup



reply via email to

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