NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: dump core while running



On Wed, Mar 04, 2009 at 08:21:02AM -0500, Martin S. Weber wrote:
> On Wed, Mar 04, 2009 at 01:28:38PM +0200, Brad du Plessis wrote:
> > Ignatios Souvatzis wrote:
> >> Actually, make that
> >>            kill(getpid(), SIGTRAP);
> >>            pause();
> >>   
> >
> > Why the pause() ?
> 
> pause(3):
> 
> "DESCRIPTION
>       Pause is made obsolete by sigsuspend(2).
> 
>       The pause() function forces a process to pause until a signal is 
> received
>       from either the kill(2) function or an interval timer. (..)"
> 
> SIGTRAP/ABRT/QUIT/ILL/EMT/FPE might be blocked. See also sigsuspend(2),
> sigaction(2), signal(7).

Maybe a sleep(1) might even be better, so that the 
forked process is guaranteed to terminate.

        -is


Home | Main Index | Thread Index | Old Index