From a previous e-mail, Al's issue was with using a file in the second command that was created in the first command. Under various operating systems and programs I have seen this situation - although the file created in the first command was closed out, it still takes the operating system a moment to mark the file as available for use. But this behaviour would only be seen in scripts where the second command is executed immediately after the first command finishes.
As Ryo mentioned, the spawn command creates a shell and executes the command. Note that this shell is not an normal interactive shell (it does not prompt for commands).
So one possibility: If you have something in your shell initialization files (such as $HOME/.bashrc, $HOME/.cshrc, $HOME/.login) that needs some interaction (or sometimes even just prints something), this can cause an error or cause it to hang. In initialization files you will see things like (for .C-type shells):
if ( $?prompt ) then
.... (commands) ...
endif
or (for Bourne-type shells):
if [ "$PS1" ]; then
... (commands) ...
fi
The commands inside these blocks are only executed in interactive shells.
You might want to try *temporarily* renaming your initialization file to see if it solves the problem with it hanging.
If it does solve the problem, you probably need to add the appropriate test for an interactive shell around some of the commands in your initialization file.
Regards,
Karl