Bug#897373: libc6: feof(file) always false when forking after read

2018-05-10 Thread Florian Weimer
* David Beniamine: > On Thu, May 10, 2018 at 07:06:03PM +0200, Florian Weimer wrote: >> * David Beniamine: >> >> > int do_fork() { >> > pid_t pid; >> > >> > switch (pid = fork()) { >> > case -1: >> > fprintf(stderr, "Fork failed\n"); >> > return -1; >> >

Bug#897373: libc6: feof(file) always false when forking after read

2018-05-10 Thread David Beniamine
On Thu, May 10, 2018 at 07:06:03PM +0200, Florian Weimer wrote: > * David Beniamine: > > > int do_fork() { > > pid_t pid; > > > > switch (pid = fork()) { > > case -1: > > fprintf(stderr, "Fork failed\n"); > > return -1; > > case 0: > > ex

Bug#897373: libc6: feof(file) always false when forking after read

2018-05-10 Thread Florian Weimer
* David Beniamine: > int do_fork() { > pid_t pid; > > switch (pid = fork()) { > case -1: > fprintf(stderr, "Fork failed\n"); > return -1; > case 0: > exit(-1); Does the issue go away when you call _exit instead of exit?

Bug#897373: libc6: feof(file) always false when forking after read

2018-05-01 Thread David Beniamine
Package: libc6 Version: 2.27-3 Severity: normal Dear Maintainer, We found a weird bug working on a small shell interpreter : feof(file) was always 0 while we read the file entirely. There is a minimal code showing the bug. If you run it with the name of a file containing at least two chars as