On Sat, Sep 10, 2016 at 1:45 PM, Dario Niedermann <dnied@tiscali.it> wrote:
Il 10/09/2016 alle 11:41, Joerg Schilling ha scritto:

> POSIX requires some commands to be callable via exec().

Il 10/09/2016 alle 19:06, Random832 ha scritto:

> something that is technically required by POSIX. There is a general
> requirement that "regular builtin" commands [with no exception for cd]
> "shall be implemented in a manner so that they can be accessed via the
> exec family of functions as defined in the System Interfaces volume of
> POSIX.1-2008 and can be invoked directly by those standard utilities
> that require it (env, find, nice, nohup, time, xargs)."

TIL! Still, it seems to me that there is no way the `cd' script can
actually accomplish anything, even when called by exec().

It can return an exit status: this makes it mostly equivalent to something like 'test -d /foo && test -x /foo'.

        - Dan C.