https://bugs.kde.org/show_bug.cgi?id=361810

            Bug ID: 361810
           Summary: valgrind duplicate stdin after fork
           Product: valgrind
           Version: 3.11.0
          Platform: Fedora RPMs
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: memcheck
          Assignee: jsew...@acm.org
          Reporter: rjo...@redhat.com

Created attachment 98408
  --> https://bugs.kde.org/attachment.cgi?id=98408&action=edit
forktest.c

It's probably best to just look at the attached C program and attached C script
(you have to use both).  The script is a minimal reproducer from a much larger
program (libguestfs).

$ gcc -Wall -O2 forktest.c -o forktest
$ chmod +x forktest.sh
$ ./forktest.sh
mask 2 buf abc
mask 2 buf def
mask 2 buf ghi
mask 2 buf abc
mask 2 buf def
mask 2 buf ghi
mask 2 buf abc
mask 2 buf def
mask 2 buf ghi
[etc forever]

In other words, stdin of the program is duplicated somehow.  It's presumably
something to do with the fork() operation.

valgrind-3.11.0-1.fc23.x86_64
glibc-2.22.90-36.fc24.x86_64
kernel 4.4.4-301.fc23.x86_64

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to