You need to keep wsh from forking and going into the background, as is its default behaviour. To do this, run wsh with the "-Z1" flag. kipp hickman silicon graphics inc.