Commit 395eb46
Close Chrome process pipes before termination to prevent loop hang (#94)
Chrome spawns renderer and utility sub-processes that inherit the open
stdin, stdout, and stderr pipes of the main browser process. When only
the main process is terminated via `Process::terminate()`, those child
processes keep the inherited file descriptors open. ReactPHP's event
loop stays alive watching those streams, so `Loop::run()` never returns
and PDF generation hangs indefinitely.
Close all process pipes explicitly before calling `terminate()` so the
event loop has no remaining streams to watch and can exit cleanly.
Co-authored-by: OoYo0uto <253079834+OoYo0uto@users.noreply.github.com>1 parent 4f2de2a commit 395eb46
1 file changed
Lines changed: 22 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
316 | | - | |
| 316 | + | |
317 | 317 | | |
318 | 318 | | |
319 | 319 | | |
| |||
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
349 | | - | |
| 349 | + | |
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
| |||
689 | 689 | | |
690 | 690 | | |
691 | 691 | | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
692 | 712 | | |
693 | 713 | | |
694 | 714 | | |
| |||
0 commit comments