| Next | System Programming in Perl | 26 |
Similarly exit
An exit command would be useless
It would fork a subprocess, and call exit on the subprocess
%builtin = (cd => sub { chdir $_[0]
|| warn "Couldn't chdir to $_[0]: $!\n"; },
exit => sub { exit $_[0] || 0 },
);
Only a few commands must be implemented as shell built-ins
umask is another example
| Next | ![]() |
26 |