[1379] in Athena Bugs
(VS2) Version 6.0C: csh
daemon@ATHENA.MIT.EDU (jik@ATHENA.MIT.EDU)
Tue Nov 15 19:40:20 1988
From: <jik@ATHENA.MIT.EDU>
Date: Tue, 15 Nov 88 18:02:02 EST
To: bugs@ATHENA.MIT.EDU
System type, version: (VS2) Version 6.0C
System name: binkley
What's wrong:
If I do the following at the prompt:
% /usr/athena/zaway &
[1] 19365
% kill %1
[1] Terminated /usr/athena/zaway
There's no problem. However, when I try to execute the following
shell script, called foo:
% cat foo
#!/bin/csh -f
/usr/athena/zaway &
sleep 5
kill %1
The following happens:
% foo
[1] 19371
%1: No such process
What should have happened:
Why won't the kill command won't work inside a shell script? For
further information, this happens with any program, not just zaway,
and it doesn't work if you try "kill %/usr" either. Also, if you put
a "jobs" command into the shell script before the kill, then the zaway
shows up as job [1], as it should.
--> Jonathan Kamens
Project Athena Watchmaker
SIPB (Student Information Processing Board) Member
Volunteer OLC Consultant
jik@ATHENA.MIT.EDU