Anthony Liguori wrote: > >- write(posix_aio_state->wfd,&byte, sizeof(byte)); > >+ ret = write(posix_aio_state->wfd,&byte, sizeof(byte)); > >+ if (ret< 0&& errno != EAGAIN) > >+ die("write()"); > > } > > > >if write() fails in a pipe in the signal handler, I am at a lost about > >what to do here. > > That's nothing we can do. I guess exiting is reasonable.
At least retry if it returns EINTR. That can happen in a signal handler, if the handler does not block all other signals. -- Jamie