Subject: Re: signal(SIGSEGV, SIG_IGN) -> 100% CPU
To: Darren Reed <email@example.com>
From: Chris G. Demetriou <firstname.lastname@example.org>
Date: 06/09/1999 21:15:24
Darren Reed <email@example.com> writes:
> When using signal(SIGSEGV, SIG_IGN), should one expect CPU usage to
> sky rocket to ~100% of that process ? I posted earlier re. pipe(2)
> causing a segmentation fault rather than returning EFAULT, HOWEVER,
> I attempted to bypass this with ignoring SEGV, except that has not
> worked as planned. If this is a bug somewhere, I'll file a PR. If
> not, it seems pretty damn stupid. FWIW, this is being tested on a
> SHARK. Test program below.
As mentioned elsewhere, this is not a bug.
you have effectively written a complex while(1) ; loop, or, probably
closer, a whlie(1) getpid(); loop.
I wouldn't except the process to prevent other processes from running,
or otherwise 'lock up' the system. if you're seeing that, you've got
Chris Demetriou - firstname.lastname@example.org - http://www.netbsd.org/People/Pages/cgd.html
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.