*BSD News Article 36864


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!uwm.edu!spool.mu.edu!sgiblab!uhog.mit.edu!uw-beaver!tera.com!bachesta
From: bachesta@angst.tera.com (Jim Bachesta)
Newsgroups: comp.unix.bsd
Subject: Re: sending "inetd" a hangup signal
Date: 12 Oct 1994 10:53:49 -0700
Organization: Tera Computer Company
Lines: 46
Sender: bachesta@Tera.COM
Distribution: world
Message-ID: <37h7rd$cmb@angst.tera.com>
References: <37d267$bpb@lastactionhero.rs.itd.umich.edu>
NNTP-Posting-Host: angst.tera.com



|>      Hi unix buffs,
|> I am trying to send the "inetd" proccess (a daemon daemon) a hangup
|> signal to make it reread it's conf file.
|> 
|> if 120 is the current procees number
|> 
|> kill -1 120 (does nothing)
|> kill  1 120 (system halt -swithced to single user mode)
|> 
|> According to the man's I should  be able to comment out a service
|> in the conf file then send a hangup signal which should disable
|> the commented out service.  So far no luck.
|> 
|> I am working on a NeXT250 with BSD
|> Any suggestions would be appreciated.
|> 
|> -madman
|> -dustin@umcc.umich.edu
|> 

Well you need to be careful on the kill signal. In the first case the kill -1 120
is correct (assuming the pid of inetd is 120). Looking at the BSD 4.4 inetd source
a SIGHUP should indeed reread the config file as show:

  sv.sv_handler = config;
    	   sigvec(SIGHUP, &sv, (struct sigvec *)0);

So either your inetd is broken, or something else is going wrong. Perhaps the
change you think you made didn't get saved or the wrong pid is given. Its 
tough to say.

In the second kill case, kill 1 120, your sending a SIGTERM (the default signal 
for kill) to pid 1 and 120. pid=1 is always the init process. The init process 
handles the spawing of login processes and handling the orderly shutdown of 
a system. It is also the parent of all orphaned process. Its vital to the system, 
so if you kill init you bring the system down. 

Hope this helps,

-- 
    Jim Bachesta               |   Unnamed Law:
    Software Type              | 
  bachesta@tera.com            |         If it happens, it must be possible.