Allow CK to terminate on FreeBSD

Remco Treffkorn remco at rvt.com
Tue Sep 4 22:26:05 PDT 2007


On Tuesday 04 September 2007, Joe Marcus Clarke wrote:
> On Tue, 2007-09-04 at 21:42 -0700, Remco Treffkorn wrote:
> > > > The diff only had the BSD conditional in it. Where is the signal
> > > > handler for SIGTERM, SIGQUIT, SIGHUP, and SIGINT? Why not just exit
> > > > from there?
> > >
> > > In the meantime, simply registering SIG_DFL for SIGTERM, SIGQUIT,
> > > SIGHUP, and SIGINT will work to terminate the process in the normal
> > > cases.
> >
> > This is really sick! Since SIG_DFL is... ahemm... the default? I think
> > that's why they call it a bug.
>
> That's not actually the bug.  The default for BSD is to restart syscalls
> rather than interrupt them.  The bug is that the kernel kept looping and
> didn't allow the pending signal to clear.  With the patch, EINTR is
> still not returned: the ioctl call simply restarts.
>
> With the workaround, the ioctl call is interrupted (as on Linux), and
> the kernel returns EINTR to userland.

man 7 signal

Posix 1 is *old*.

Getting to 2 or 3 decades now?

I have not seen the patch, so I can not comment. I hardly think behaving like 
Linux is the 'correct' thing to do, since Linux may not do the 'right' thing 
either.

Pick a standard, and adhere to it. What standard does FreeBSD want to 
implement?

Cheers,
Remco

-- 
Remco Treffkorn (RT445)
HAM DC2XT
remco at rvt.com   (831) 685-1201



More information about the hal mailing list