Re[2]: easy question about kill command



Hi, Oliver.

> roma.a.g <roma.a.g@xxxxxxxxx> wrote:
>> Is there anyone who can explain me, why when i say 'kill -HUP id',
>> and its failed to restart, kill say nothing?

> Because the kill command has no way to know about it.

> The kill command only instructs the kernel to deliver
> a signal to a process (or to a process group). The only
> feedback it gets from the kernel is whether the target
> process exists or not. (The latter is often used to
> check for the existence of a particular process ID, by
> trying to send it a "zero" signal which does nothing.)

> There is no way for the kill command to know what the
> target process is going to do with the signal. This is
> entirely and only the business of the target process,
> which might chose to take the default action (in the case
> of SIGHUP it's to terminate the process), to ignore the
> signal alltogether, or to take some special action.
> Some programs use SIGHUP traditionally to rotate their
> logfiles, re-read configuration files, re-open network
> sockets, restart themselves, or other things. But that's
> entirely up to the program in question, and there is no
> way the kill command could know about it, let alone
> whether it was successful or not.

Thanks for your reply. My question was about standard bsd daemons, not
about some apps with unpredictable behaviour.

>> It is such an easy to implement...

> I don't think so, as explained above.

Yeah right, I see now.


> Best regards
> Oliver




--
Best regards,
Roman Gorohov mailto:roma.a.g@xxxxxxxxx

_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: easy question about kill command
    ... >> the business of the target process, which might chose to take the ... >> restart themselves, or other things. ... and there is no way the kill command could ... My question was about standard bsd daemons, ...
    (freebsd-hackers)
  • Re: easy question about kill command
    ... Because the kill command has no way to know about it. ... The kill command only instructs the kernel to deliver ... target process is going to do with the signal. ... sockets, restart themselves, or other things. ...
    (freebsd-hackers)
  • Re: easy question about kill command
    ... >> and its failed to restart, ... > Because the kill command has no way to know about it. ... > feedback it gets from the kernel is whether the target ... I forgot to add one further fact: The target process ...
    (freebsd-hackers)
  • Re: restarting xinetd
    ... > want to restart xinetd so the new definition is picked up. ... > the kill command just ends and I'm back at a command prompt. ... maybe it just re-reades the config file without saying ...
    (Fedora)
  • Re: kill not working
    ... > Because my question was not in regards to whether my proc is a problem or ... Or do you think the KILL command is broken, ... allegedly dysfunctional kill command. ...
    (microsoft.public.sqlserver.programming)