Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!rutgers!mephisto!udel!princeton!bow.Princeton.EDU!pfalstad From: pfalstad@bow.Princeton.EDU (Paul John Falstad) Newsgroups: comp.unix.questions Subject: Re: Preventing Idle in telnet, security, and bg. Message-ID: <2903@idunno.Princeton.EDU> Date: 28 Sep 90 14:56:44 GMT References: <14228@hydra.gatech.EDU> Sender: news@idunno.Princeton.EDU Reply-To: pfalstad@bow.Princeton.EDU (Paul John Falstad) Distribution: comp Lines: 41 In article <14228@hydra.gatech.EDU>, gt0178a@prism.gatech.EDU (JIM BURNS) writes: |> in article , davis@pacific.mps.ohio-state.edu ("John E. Davis") says: |> > However, sometimes I forget to kill it before I logout. I was wondering |> > what is the best way to put it into the background so that when I logout, it |> > dies? I wrote the program in c, if this helps. |> |> Seems to me that progs backgrounded w/ a plain '&' would be killed |> automatically when you logout. It's 'nohup'-ed procs that survive. The man page for 'csh' says "all processes detached with & are effectively nohup'ed." Kind of makes you wonder why nohup exists. Try this in your favorite shell: $ csh (or whatever) % sleep 100 & % kill -HUP $$ $ ps |> > executable file called 'ls'. Here it is: |> [...] |> > What happens, is if someone steps into this directory and types 'ls' this |> > thing takes his picture. In principle, he could add a few more lines to copy |> |> Not very useful unless the intruder has '.' in his $PATH, and useless if |> he 'ls's that directory from another. Well, most people have '.' in their path (I think), but it's not to smart to have it first in your path. This only works if '.' is before /bin. |> -- |> BURNS,JIM |> Georgia Institute of Technology, Box 30178, Atlanta Georgia, 30332 |> uucp: ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!gt0178a |> Internet: gt0178a@prism.gatech.edu -- Here is the address to complain to: pfalstad@phoenix.princeton.edu PLink:HYPNOS GEnie:P.FALSTAD CIS: 70016,1355 That address again, sync@thumper.princeton.edu PLink:OHS738 GEnie:OHS738 CIS: 4128 143 1234 937