script for interactive fortran test

Kate Lowenstein katel at amdcad.AMD.COM
Sat May 21 02:16:46 AEST 1988


Many thanks to all who sent suggestions.  I tried
just about every suggested solution.  The answer came
from Avi Block from National Semiconductor in Israel.
Here is his solution:

*****************************************************************
*****************************************************************

First of all the reason this happens is because the PAUSE routine
checks if stdin is a tty or not.  If so, it asks for a GO else it
gives the kill message.  The idea is to try to find the process
number and to send the kill with the found number.

The following shell script was what worked:

-----------------------------------------------------------------
#!/bin/sh
<prog_name> &
pn=`ps | grep <prog_name> | grep -v grep | sed 's/ *\([0-9]*\).*/\1/'`
kill -15 $pn
kill -15 $pn
kill -15 $pn
kill -15 $pn
kill -15 $pn
-------------------------------------------------------------------

*****************************************************************
*****************************************************************

again, many thanks to all of you who came through with your
suggestions (and thanks, Avi!)



More information about the Comp.unix.wizards mailing list