1.1 --- a/test_files/programs/test_popenv.c Sat Jun 01 23:58:28 2024 +0200
1.2 +++ b/test_files/programs/test_popenv.c Sat Jun 01 23:59:38 2024 +0200
1.3 @@ -141,7 +141,8 @@
1.4 /* If no input remains and stdin has been closed, close the input
1.5 pipe. */
1.6
1.7 - if (!input_remaining && port_source_event_flags(port_file_source(fileno(stdin))) & PORT_CLOSE)
1.8 + if (!input_remaining && (feof(stdin) ||
1.9 + port_source_event_flags(port_file_source(fileno(stdin))) & PORT_CLOSE))
1.10 {
1.11 fclose(input);
1.12 input = NULL;