Re: Incorect signal handling ?

2001-04-12 Thread Doug McNaught
Daniel Podlejski <[EMAIL PROTECTED]> writes: > Hi, > > there is litlle programm: > > signal (SIGALRM, empty); > alarm (1); > > a = read(fd, buf, 511); > > while (a && a != -1) a = read(fd, buf, 511); > I open /tmp/nic and run compiled program. > There should be er

Re: Incorect signal handling ?

2001-04-12 Thread Richard B. Johnson
On Thu, 12 Apr 2001, Daniel Podlejski wrote: > Hi, > > there is litlle programm: > > #include > #include > #include > #include > #include > #include > #include > > static void empty(int sig) > { > printf ("hello\n"); > return; > } > > void main() > { > int fd, a; >

Incorect signal handling ?

2001-04-12 Thread Daniel Podlejski
Hi, there is litlle programm: #include #include #include #include #include #include #include static void empty(int sig) { printf ("hello\n"); return; } void main() { int fd, a; char buf[512]; if (fd = open("/tmp/nic", O_RDONLY) < 0) {