[plug] Re: Leon's Sig Code

Leon Brooks leon at brooks.fdns.net
Fri Mar 2 10:33:04 WST 2001


Steve Baker wrote:

>> // send the signal of 'SIGSTOP' to the process with the reason
>> // 'SIGBUS' (hardware failure or incorrect address)
>>       kill(pid,random()&1?SIGSTOP:SIGBUS);

> Not quite.  Get a random number, if it's odd send SIGSTOP signal, otherwise
> send the SIGBUS signal.

In other words, either freeze or cause a pretend buss-error for a random 
process...

-- 
Me:   "Uh... I think your disk has a bad sector."
User: "But it can't! It worked fine yesterday!"
Me:   "Well, yes, things usually work fine before they break.
        Otherwise they'd break sooner." -- jwgh




More information about the plug mailing list