1824212 Members
4017 Online
109669 Solutions
New Discussion юеВ

inetd on Solaris 2.5

 
SOLVED
Go to solution
Neil Edwards
Advisor

inetd on Solaris 2.5

Hi,

I know that I should post this at Sun but I figure that I'll get a much quicker answer here.

I have made come changes to inetd.conf on a Sun running Solaris 2.5. I've saved the changes but when I run inetd -c the command fails. A man of inetd shows no option to force a reconfiguration of inetd. So now what do I do to get my changes to occur with a reboot?

TIA, Neil
It wasn't me.
7 REPLIES 7
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: inetd on Solaris 2.5

Hi Neil:

We don't need no stinkin' -c option - that's just an HP convenience. All inetd's since the dawn of time respond to a SIGHUP.

You just need to do a ps -e | grep inetd and get the PID. Then kill -1 PID.

That should fix you, Clay
If it ain't broke, I can fix that.
Neil Edwards
Advisor

Re: inetd on Solaris 2.5

Wow, that was fast!!!

I don't understand. Won't a kill -1 PID kill the inetd process? This is a production server so inetd must not be killed.

Thanks again, Neil
It wasn't me.
Jeff Schussele
Honored Contributor

Re: inetd on Solaris 2.5

Or

kill -SIGHUP PID

kill -HUP PID

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Jeff Schussele
Honored Contributor

Re: inetd on Solaris 2.5

1 is the signal number for SIGHUP or hangup.
This signal kills the process AND then restarts it.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
A. Clay Stephenson
Acclaimed Contributor

Re: inetd on Solaris 2.5

No, not at all; it's perfrectly safe. A kill doesn't kill a process; it sends a signal to a process. That MIGHT result in the termination of a process but in this case, a SIGHUP is caught by inetd, inetd.conf is then reread, and the signal handler is again set to respond to a SIGHUP.

This is the C equivalent to a 'trap' in the shell - actually it's the other way around since the shell is written in C.
If it ain't broke, I can fix that.
Jeff Schussele
Honored Contributor

Re: inetd on Solaris 2.5

Oops misspoke somewhat there...
*Most* of the time kill -1 will stop/restart the process.
But as Clay pointed out - in this case inetd traps that signal & then has a special action - re-read the conf file.
BUT even if inetd was stopped/restarted it wouldn't hurt because a kill on inetd will not break any current connections - it just prevents new ones until inetd starts again.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Neil Edwards
Advisor

Re: inetd on Solaris 2.5

Thanks guys. This place is great. I'm all fixed.
It wasn't me.