… | |
… | |
801 | |
801 | |
802 | if (!res_queue.size) |
802 | if (!res_queue.size) |
803 | { |
803 | { |
804 | /* read any signals sent by the worker threads */ |
804 | /* read any signals sent by the worker threads */ |
805 | char buf [4]; |
805 | char buf [4]; |
806 | while (PerlSock_recv (respipe [0], buf, 4, 0) == 4) |
806 | while (respipe_read (respipe [0], buf, 4) == 4) |
807 | ; |
807 | ; |
808 | } |
808 | } |
809 | } |
809 | } |
810 | |
810 | |
811 | X_UNLOCK (reslock); |
811 | X_UNLOCK (reslock); |
… | |
… | |
1293 | ++npending; |
1293 | ++npending; |
1294 | |
1294 | |
1295 | if (!reqq_push (&res_queue, req)) |
1295 | if (!reqq_push (&res_queue, req)) |
1296 | { |
1296 | { |
1297 | /* write a dummy byte to the pipe so fh becomes ready */ |
1297 | /* write a dummy byte to the pipe so fh becomes ready */ |
1298 | send (respipe_osf [1], (const void *)&respipe_osf, 1, 0); |
1298 | respipe_write (respipe_osf [1], (const void *)&respipe_osf, 1); |
1299 | |
1299 | |
1300 | /* optionally signal the main thread asynchronously */ |
1300 | /* optionally signal the main thread asynchronously */ |
1301 | if (main_sig) |
1301 | if (main_sig) |
1302 | pthread_kill (main_tid, main_sig); |
1302 | pthread_kill (main_tid, main_sig); |
1303 | } |
1303 | } |
… | |
… | |
1370 | idle = 0; |
1370 | idle = 0; |
1371 | nreqs = 0; |
1371 | nreqs = 0; |
1372 | nready = 0; |
1372 | nready = 0; |
1373 | npending = 0; |
1373 | npending = 0; |
1374 | |
1374 | |
1375 | PerlSock_closesocket (respipe [0]); |
1375 | respipe_close (respipe [0]); |
1376 | PerlSock_closesocket (respipe [1]); |
1376 | respipe_close (respipe [1]); |
1377 | |
1377 | |
1378 | create_pipe (respipe); |
1378 | create_pipe (respipe); |
1379 | |
1379 | |
1380 | atfork_parent (); |
1380 | atfork_parent (); |
1381 | } |
1381 | } |