about summary refs log tree commit diff
path: root/sysdeps/pthread/aio_notify.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/pthread/aio_notify.c')
-rw-r--r--sysdeps/pthread/aio_notify.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sysdeps/pthread/aio_notify.c b/sysdeps/pthread/aio_notify.c
index 877e8d9363..4d2611f0a1 100644
--- a/sysdeps/pthread/aio_notify.c
+++ b/sysdeps/pthread/aio_notify.c
@@ -1,6 +1,5 @@
 /* Notify initiator of AIO request.
-   Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004
-   Free Software Foundation, Inc.
+   Copyright (C) 1997-2001, 2003, 2004, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
@@ -148,7 +147,12 @@ __aio_notify (struct requestlist *req)
       --*waitlist->counterp;
 
       if (waitlist->sigevp == NULL)
-	pthread_cond_signal (waitlist->cond);
+	{
+	  if (waitlist->result != NULL && aiocbp->__return_value == -1)
+	    *waitlist->result = -1;
+
+	  pthread_cond_signal (waitlist->cond);
+	}
       else
 	/* This is part of a asynchronous `lio_listio' operation.  If
 	   this request is the last one, send the signal.  */