[TUHS] Shell control through external commands

Dan Cross crossd at gmail.com
Sun Sep 11 05:53:56 AEST 2016

On Sat, Sep 10, 2016 at 1:45 PM, Dario Niedermann <dnied at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20160910/e92e2ced/attachment.html>

More information about the TUHS mailing list