can SIGPWR signal really allow u to detect machine crash in Unix?

Dave Decot decot at hpisod2.HP.COM
Tue Aug 21 12:49:47 AEST 1990


>         I am doing client and server distributed programming. I would like
> to capture all the signals in Unix, particularly SIGPWR in order to inform
> the other party about the failure. In this case, can SIGPWR can really be
> caught in the program if there is power failure? If yes, normally how
> much time is allowed for the SIGPWR signal handler to run and inform the
> failure to the remote party?

The SIGPWR signal is sent to all processes *after the power has returned
and the system has recovered* from a power failure, instead of *prior to*
the power failure.

SIGPWR is not necessarily generated by all implementations that seem to
support that signal name.  In particular, those machines that do not recover
automatically from power failure obviously won't have any processes to
which to send the signal.

The point of SIGPWR is for applications that want to do something special
(such as reinitialization) when power returns and the system has automatically
recovered.

By default, SIGPWR is ignored.  After power is restored, processes not
catching SIGPWR will simply continue on as if nothing had happened,
since system memory and the time-of-day clock is backed up by a battery.

On HP-UX, the SIGPWR signal is generated by HP9000 Series 600 and 800
systems (that is, those with the PA-RISC architecture).

>> DISCLAIMER: These are my opinions only; I do not represent HP on notes. <<

Dave Decot



More information about the Comp.unix.questions mailing list