Preventing Idle in telnet, security, and bg.

Paul John Falstad pfalstad at bow.Princeton.EDU
Sat Sep 29 00:56:44 AEST 1990


In article <14228 at hydra.gatech.EDU>, gt0178a at prism.gatech.EDU (JIM BURNS) writes:
|> in article <DAVIS.90Sep28015809 at pacific.mps.ohio-state.edu>, davis at 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 at prism.gatech.edu

-- 
Here is the address to complain to:
pfalstad at phoenix.princeton.edu PLink:HYPNOS GEnie:P.FALSTAD CIS: 70016,1355
That address again,
sync at thumper.princeton.edu PLink:OHS738 GEnie:OHS738 CIS: 4128 143 1234 937



More information about the Comp.unix.questions mailing list