Commit d1e2d99
committed
bug69442.phpt: avoid feof() Notice on closed PTY slave
The previous patch read until feof() returned true, but feof() on a PTY
pipe can trigger an underlying read of the default 8192-byte buffer that
returns EIO once the slave side has closed. PHP surfaces that as a
Notice, which appears in stdout and breaks the --EXPECT-- block on every
platform with PTY support.
Drop the feof() check, exit the loop as soon as stream_select reports no
data within 1s (PTY EOF), and silence any EIO Notice from the trailing
fread/stream_select. Also shrinks the wall-clock cap from 10s to 5s so
the success path stops sitting in select for the full deadline.1 parent 1266163 commit d1e2d99
1 file changed
Lines changed: 10 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
37 | 39 | | |
38 | 40 | | |
39 | | - | |
| 41 | + | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 45 | + | |
| 46 | + | |
48 | 47 | | |
49 | | - | |
| 48 | + | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
0 commit comments