What's up with /usr/src/usr.bin/alias?
Jordan K. Hubbard
jkh at queasyweasel.com
Tue Mar 2 21:41:02 PST 2004
As some people already know, the SUSv2 standards require that a number
of commands which are typically implemented as shell built-ins also
exist in /usr/bin (for reasons which are at best clear to The Open
Group). Unfortunately, the Open Group UNIX conformance test suite also
tests that these things actually *work*, which can't be said for
FreeBSD's current set, as we can see by the following interaction with
/bin/sh:
# cat
^Z
[1] + Suspended cat
# /usr/bin/fg
fg: No current job
# /usr/bin/jobs
# jobs
[1] + Suspended cat
# fg
cat
^D
#
Using the fg and jobs builtins work, using the "command equivalents" do
not. The same is true for things like alias. I suspect this is simply
due to the implementation, which invokes the commands in a subshell and
thus won't actually work in the context of a test harness which is
actually verifying that they did what they said they were going to do
afterwards. Naturally, implementing something like "cd" as a command
vs a builtin is also pretty darn hard so I'm not saying I don't
understand why somebody might have punted on these, I'm simply
wondering what the justification for trying to do this at all was given
the shortcomings of the chosen approach.
--
Jordan K. Hubbard
Engineering Manager, BSD technology group
Apple Computer
More information about the freebsd-standards
mailing list