HaxeFoundation / HaxeFoundation/haxe
[eval] Process.stdout.readByte() never throws haxe.io.Error.Blocked
- Dominant language
- Haxe
- Stars
- 6.9k
- Forks
- 715
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 11
Description
Despite the code of `readByte` it never throws `Error.Blocked`:
https://github.com/HaxeFoundation/haxe/blob/a7ae1c6a57d320d5a6eeffab7dec266af0f29f53/std/eval/_std/sys/io/Process.hx#L79-L83
```haxe
class Main {
public static function main() {
var p = new sys.io.Process('haxe', ['-cmd', 'sleep 10']);
p.stdout.readByte();
}
}
```
```
$ haxe -cp src --run Main
<... hangs for 10 seconds ...>
/usr/share/haxe/std/eval/_std/sys/io/Process.hx:93: characters 4-9 : Uncaught exception Eof
/usr/share/haxe/std/eval/_std/sys/io/Process.hx:80: characters 7-27 : Called from here
src/Main.hx:12: characters 8-27 : Called from here
```
Contributor guide
Assessment
This issue has not been assessed yet.