projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix out-of-bound read processing time zone data with distant-past dates
[musl]
/
src
/
aio
/
lio_listio.c
diff --git
a/src/aio/lio_listio.c
b/src/aio/lio_listio.c
index
07145dd
..
0799c15
100644
(file)
--- a/
src/aio/lio_listio.c
+++ b/
src/aio/lio_listio.c
@@
-1,6
+1,5
@@
#include <aio.h>
#include <errno.h>
#include <aio.h>
#include <errno.h>
-#include <limits.h>
#include <unistd.h>
#include <string.h>
#include "pthread_impl.h"
#include <unistd.h>
#include <string.h>
#include "pthread_impl.h"
@@
-44,7
+43,7
@@
static void notify_signal(struct sigevent *sev)
.si_signo = sev->sigev_signo,
.si_value = sev->sigev_value,
.si_code = SI_ASYNCIO,
.si_signo = sev->sigev_signo,
.si_value = sev->sigev_value,
.si_code = SI_ASYNCIO,
- .si_pid =
__pthread_self()->pid
,
+ .si_pid =
getpid()
,
.si_uid = getuid()
};
__syscall(SYS_rt_sigqueueinfo, si.si_pid, si.si_signo, &si);
.si_uid = getuid()
};
__syscall(SYS_rt_sigqueueinfo, si.si_pid, si.si_signo, &si);
@@
-114,7
+113,7
@@
int lio_listio(int mode, struct aiocb *restrict const *restrict cbs, int cnt, st
if (st) {
pthread_attr_t a;
if (st) {
pthread_attr_t a;
- sigset_t set;
+ sigset_t set
, set_old
;
pthread_t td;
if (sev->sigev_notify == SIGEV_THREAD) {
pthread_t td;
if (sev->sigev_notify == SIGEV_THREAD) {
@@
-129,15
+128,16
@@
int lio_listio(int mode, struct aiocb *restrict const *restrict cbs, int cnt, st
}
pthread_attr_setdetachstate(&a, PTHREAD_CREATE_DETACHED);
sigfillset(&set);
}
pthread_attr_setdetachstate(&a, PTHREAD_CREATE_DETACHED);
sigfillset(&set);
- pthread_sigmask(SIG_BLOCK, &set, &set);
+ pthread_sigmask(SIG_BLOCK, &set, &set
_old
);
if (pthread_create(&td, &a, wait_thread, st)) {
free(st);
errno = EAGAIN;
return -1;
}
if (pthread_create(&td, &a, wait_thread, st)) {
free(st);
errno = EAGAIN;
return -1;
}
- pthread_sigmask(SIG_SETMASK, &set, 0);
+ pthread_sigmask(SIG_SETMASK, &set
_old
, 0);
}
return 0;
}
}
return 0;
}
+weak_alias(lio_listio, lio_listio64);