I stand (sit, actually) corrected !

When I was (even more) Linux newbie (than now), I briefly surveyed the
methods offered for doing subsecond waits, and as I remember, some of
them had a warning about signal interference attached, as of some older
version of libc docs had it. As I felt this was unclean (sic) and they
actually couldn't do the job either (I wanted 1 to 2 msec waits), I
haven't use them for anything.

> ----------
> From:         Glynn Clements[SMTP:[EMAIL PROTECTED]]
> Sent:         29. september 1998 14:47
> To:   Niels Hald Pedersen
> Cc:   Marin D; [EMAIL PROTECTED]
> Subject:      RE: Waiting for 125msecs.
> 
> 
> Niels Hald Pedersen wrote:
> 
> > I would suspect usleep to encapsulate "the SIGALRM method of
> waiting"
> > (set an alarm, sending process a signal after a given time, wait for
> the
> > signal, handle it),
> 
> It doesn't appear to. Sending SIGALRM to the following program doesn't
> cause it to terminate any sooner.
> 
>       #include <unistd.h>
>       #include <signal.h>
>       
>       int main(void)
>       {
>               signal(SIGALRM, SIG_IGN);
>               usleep(10 * 1000000);
>               return 0;
>       }
> 
> -- 
> Glynn Clements <[EMAIL PROTECTED]>
> 

Reply via email to