… | |
… | |
169 | } |
169 | } |
170 | |
170 | |
171 | static void |
171 | static void |
172 | poll_wait () |
172 | poll_wait () |
173 | { |
173 | { |
|
|
174 | if (!nreqs) |
|
|
175 | return; |
|
|
176 | |
174 | fd_set rfd; |
177 | fd_set rfd; |
175 | FD_ZERO(&rfd); |
178 | FD_ZERO(&rfd); |
176 | FD_SET(respipe[0], &rfd); |
179 | FD_SET(respipe[0], &rfd); |
177 | |
180 | |
178 | select (respipe[0] + 1, &rfd, 0, 0, 0); |
181 | select (respipe[0] + 1, &rfd, 0, 0, 0); |
… | |
… | |
199 | int errorno = errno; |
202 | int errorno = errno; |
200 | errno = req->errorno; |
203 | errno = req->errorno; |
201 | |
204 | |
202 | if (req->type == REQ_READ) |
205 | if (req->type == REQ_READ) |
203 | SvCUR_set (req->data, req->dataoffset |
206 | SvCUR_set (req->data, req->dataoffset |
204 | + req->result > 0 ? req->result : 0); |
207 | + (req->result > 0 ? req->result : 0)); |
205 | |
208 | |
206 | if (req->data) |
209 | if (req->data) |
207 | SvREFCNT_dec (req->data); |
210 | SvREFCNT_dec (req->data); |
208 | |
211 | |
209 | if (req->type == REQ_STAT || req->type == REQ_LSTAT || req->type == REQ_FSTAT) |
212 | if (req->type == REQ_STAT || req->type == REQ_LSTAT || req->type == REQ_FSTAT) |
… | |
… | |
238 | } |
241 | } |
239 | |
242 | |
240 | static sigset_t fullsigset; |
243 | static sigset_t fullsigset; |
241 | |
244 | |
242 | #undef errno |
245 | #undef errno |
243 | #include <asm/unistd.h> |
246 | #include <linux/unistd.h> |
244 | #include <linux/types.h> |
247 | #include <linux/types.h> |
245 | #include <sys/prctl.h> |
248 | #include <sys/prctl.h> |
246 | |
249 | |
247 | #if __alpha || __ia64 || __hppa || __v850__ |
250 | #if __alpha || __ia64 || __hppa || __v850__ |
248 | # define stat kernelstat |
251 | # define stat kernelstat |