Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!ucbvax!bloom-beacon!mintaka!streeter From: streeter@theory.lcs.mit.edu (Kenneth B Streeter) Newsgroups: comp.unix.shell Subject: Problems with Job Control in csh Message-ID: <1991Apr9.133344.1733@mintaka.lcs.mit.edu> Date: 9 Apr 91 13:33:44 GMT Sender: streeter@im.lcs.mit.edu Followup-To: comp.unix.shell Distribution: na Organization: Laboratory for Computer Science, MIT Lines: 26 I'm having problems with trying to do job control in a csh script. I want to be able to commence a background job (I'm using the & metacharacter), use it for some request-handling, and then later kill the backgrounded job. I'm trying something like the following: (text in brackets is stuff specific to my application, and not generally necessary) #!/bin/csh -f xterm -e "" & # kill %1 The intent with the 'kill' is to kill the backgrounded job (the xterm). If I do a 'jobs' before the kill, the xterm job is listed as an active job (Running) under job control with job number [1]. However, the kill statement terminates with "%1: No such process". What is wrong with my understanding here? -- Kenneth B. Streeter | ARPA: streeter@im.lcs.mit.edu MIT LCS, Room NE43-350 | UUCP: ...!uunet!im.lcs.mit.edu!streeter 545 Technology Square | (617) 253-2614 (work) Cambridge, MA 02139 | (617) 225-2249 (home)