Subject: standards/11197: POSIX.2: regular builtins can't be exec'ed.
To: None <email@example.com>
From: Ben Harris <firstname.lastname@example.org>
Date: 10/12/2000 05:24:16
>Synopsis: POSIX.2: regular builtins can't be exec'ed.
>Arrival-Date: Thu Oct 12 05:24:00 PDT 2000
>Originator: Ben Harris
NetBSD cromarty 1.4X NetBSD 1.4X (CROMARTY) #9: Wed May 3 23:49:51 BST 2000
POSIX.2 requires that all utilities be able to be run by the likes of
xargs. This includes things that are usually shell builtins. In NetBSD,
of the utilities in the base standard, "cd", "command", "getopts",
"umask" and "wait" cannot be so run.
There are also some builtins in the User Portability Extension that are
likely to need the same treatment.
$ export PATH=`getconf PATH`
$ echo "eep" | xargs cd
xargs: cd: No such file or directory
$ echo "eep" | xargs command
xargs: command: No such file or directory
$ echo "eep" | xargs getopts
xargs: getopts: No such file or directory
$ echo "eep" | xargs umask
xargs: umask: No such file or directory
$ echo "eep" | xargs wait
xargs: wait: No such file or directory
The relevant section of the POSIX.2 rationale suggests making each of
these a symlink to the following shell script:
Crude, but probably good enough for the purpose at hand.
Ben Harris <email@example.com>
Portmaster, NetBSD/arm26 <URL:http://www.netbsd.org/Ports/arm26/>