[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: external versions of sh built-in utilities
Robert Elz wrote:
That leaves the rest. These are the commands that have to be built into
the shell or they won't do anything useful. This is commands like
cd, ulimit, wait, times, bg, fg, jobs, ... there are actually quite a lot
(you can read the sh man page to see the complete set, just omit the
ones in the other two categories.) These have no external command
equivalent (because such a thing would be useless).
The "times" command is not currently documented in the sh man page.
This leads to the crux of the matter - I have been told that POSIX
actually requires that all of the commands in this third category (actually
all the sh built-in commands, except the special built-ins) have an
executable that can be subject of an execvp(2) call. The second group
already have that, so it is only the third that matter here.
Apparently the standard way to conform with this requirement (if it exists,
it is possible it once did, and then sanity took over - as unlikely as that
seems in the standards community, sometimes they do the right thing) is to
create a small script
$(basename $0) "$@"
So should we do something like this?
I don't think so. Maybe just amend the sh man page with a note (and cite
the small script?)?
Main Index |
Thread Index |