#!/bin/csh -f

if ($#argv < 2) then
   echo "Usage: save_pid pid_file command"
   exit 1
endif

set file = $1
shift

echo $$ >! $file

eval exec $argv:q
