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

Re: Signal doesn't interrupt read() and wait() - help!



On Thu, 5 Feb 1998, Julian Coleman wrote:

> Indeed I can.  Funnily enough, it also happens under NetBSD/Atari.  If
> you put a printf inside the signal handler, you will see that it does get
> called.

Ok well then there must be some way to change this behaviour. In mgetty
under BSD it uses siginterrupt() to make those signals interrupt system
calls (at least I think that's what this is for) but MiNT doesn't seem to
have a siginterrupt call.

So how is it done in MiNT? It must be possible, mgetty is known to work on
all manner of machines even though it relies on this behaviour.

> 	'If system calls are automatically restarted, the read is not
> 	interrupted when the SIGALARM signal handler returns.  In this
> 	case the time out does nothing.'
> 
> The suggested workround is to use longjmp inside the signal handler.  E.g.

Hmm so how does mgetty work on other systems, even though it doesn't do
this, I wonder. There must be a way of enabling the interruption of system
calls.

So any ideas about what this might be?

-- 
Mario Becroft                        Auckland, New Zealand
mb@tos.pl.net                    http://www.pl.net/~mario/      |\__/,|   (`\
Tariland, Atari Support in New Zealand                        _.|o o  |_   ) )
tariland@tos.pl.net     http://www.pl.net/~mario/tariland/ --(((---(((--------