mirror of
https://github.com/danog/parallel.git
synced 2024-11-30 04:39:01 +01:00
Add eof check on STDIN
This commit is contained in:
parent
fe4df13ab9
commit
fd6c531d87
@ -50,7 +50,7 @@ Loop::run(function () use ($argc, $argv) {
|
||||
|
||||
// Read random key from STDIN and send back to parent over IPC socket to authenticate.
|
||||
do {
|
||||
if (($chunk = \fread(\STDIN, Process::KEY_LENGTH)) === false) {
|
||||
if (($chunk = \fread(\STDIN, Process::KEY_LENGTH)) === false || \feof(\STDIN)) {
|
||||
\trigger_error(E_USER_ERROR, "Could not read key from parent");
|
||||
exit(1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user