The system Command
Q: The system
command is supposed to pass commands to the operating system that is
running xfst. For Solaris,
Linux, and MacOSX systems, that means passing a command to a Unix
shell. Commands such as system ls
(list the files in the current directory) work in the expected way but
commands such as system cd ..
(change the current directory up one level) do absolutely nothing. Why this bug? Will it be fixed in a future release?
A: Unfortunately this bug (if that's what it
is) can never be fixed. The system
commands passed to the operating system are not executed in the
shell that is running xfst but
in a subordinate shell that is killed when the command has been
executed. This works fine for commands such as system ls that
print information that is independent of the shell but not for the
command system
cd ..
that changes the current directory of the shell that is executing the
command.
The same goes for parenthesized commands in a Unix shell: (pwd) prints
the path to the current directory but (cd ..)
is useless.