aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--man7/aio.712
1 files changed, 7 insertions, 5 deletions
diff --git a/man7/aio.7 b/man7/aio.7
index b150a2615c..275c0b7639 100644
--- a/man7/aio.7
+++ b/man7/aio.7
@@ -282,12 +282,14 @@ quitHandler(int sig)
static void /* Handler for I/O completion signal */
aioSigHandler(int sig, siginfo_t *si, void *ucontext)
{
- write(STDOUT_FILENO, "I/O completion signal received\\n", 31);
+ if (si->si_code == SI_ASYNCIO) {
+ write(STDOUT_FILENO, "I/O completion signal received\\n", 31);
- /* The corresponding ioRequest structure would be available as
- struct ioRequest *ioReq = si\->si_value.sival_ptr;
- and the file descriptor would then be available via
- ioReq\->aiocbp\->aio_fildes */
+ /* The corresponding ioRequest structure would be available as
+ struct ioRequest *ioReq = si\->si_value.sival_ptr;
+ and the file descriptor would then be available via
+ ioReq\->aiocbp\->aio_fildes */
+ }
}
int