Wouldn't it be a whole lot easier to have the shell save its own pid in a known file, or maybe a file specified through an environment variable? Maybe put if ( $?SAVEPID ) then echo $$ > $SAVEPID endif in your .cshrc? ________________________________________________________ Matt Crawford matt at oddjob.uchicago.edu