Spawning an Interactive Shell

unix(shell) starts up an interactive shell. Under UNIX, the shell run depends on your SHELL environment variable. You can exit from the shell by typing ^d (or your end-of-file character) unless under Emacs, in which case you should type ^x ^d. The Prolog idiom end_of_file. will not work in this context. If ignoreeof is set (for example, in your .cshrc file), ^d may not work (setting ignoreeof turns off ^d). In this case, you may type exit to the shell to kill it. The call to unix(shell) fails if a non-zero result is returned by the shell.

Please note: Under UNIX, invoking the predicate unix(shell) when your SHELL environment variable is set to a non-standard shell (not csh(1) or sh(1)) may cause echoing problems under the Emacs interface due to the stty settings of the non-standard shell. If a non-standard shell proves to be a problem, an alternative is to use either unix(shell(sh)) or unix(shell(csh)) to invoke the standard shell, respectively.