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

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



> I think this short program might help to explain the problem. Try it out
> and see that when the alarm signal arrives, the read() call does not
> return like it seems it should.
> 
> This just shows the problem in read(), it also happens in wait() and
> perhaps others.
> 
> So now that you can see the problem happening in front of you, perhaps
> someone has some other ideas about why this is.

I compiled it on our server here (RedHat Linux, kernel 2.0.31). It behaves
exactly the same - i.e. the read() call waits until you press Enter and
doesn't return automatically after 5 seconds. The signal however is
delivered (the appropriate variable changes).

Konrad M.Kokoszkiewicz
mail: draco@mi.com.pl
http://www.orient.uw.edu.pl/~conradus/
http://www.obta.uw.edu.pl/~draco/

** Ea natura multitudinis est,
** aut servit humiliter, aut superbe dominatur (Liv. XXIV,25)
*************************************************************
** U pospolstwa normalne jest, ze albo sluzy ono unizenie,
** albo bezczelnie sie panoszy.