Repository navigation
Commit 7361306
committed
Fix FIFO hang in npm v4 lockfile package.json read
Replace bare std::fs::read_to_string with read_regular_to_string_sync in
has_native_patch to prevent indefinite blocking on FIFOs or device files
planted at package.json path. The guard uses O_NONBLOCK open + fstat
regular-file check, matching lockfile reads in select_lockfile and other
package.json readers throughout the npm vendor stack.1 parent b3eaff4 commit 7361306
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
487 | 487 | | |
488 | 488 | | |
489 | 489 | | |
490 | | - | |
| 490 | + | |
491 | 491 | | |
492 | 492 | | |
493 | 493 | | |
| |||
0 commit comments