>       #include <stdio.h>
>       #include <errno.h>
>       #include <signal.h>
> 
>       void key( )
>       {
>       printf("Some key\n");
>       }
> 
>       char buff[10];
>       int nbytes;
> 
>       main( )
>       {
> 
>       signal(SIGALRM, key);
>       alarm(5);
> 
>       nbytes = read ( STD_IN, buff, 10 );
>       if ( errno == EINTR )
>               {
>               printf("Syscall interrupted by signal\n");
>               }
>       .....
>       .....
>       } /*  End main */

Heck I found that while signal does get delivered but it doesn't come out of 
program unless I press a key. I tried fflushing stdin/stdout. Didn't work.

But signal is caught.. No trouble there. I am using MDK8.1..

 Shridhar

_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help

Reply via email to