android_kernel_samsung_msm8976/arch/um
Vegard Nossum 9cbb43b99b uml: flush stdout before forking
commit 0754fb298f2f2719f0393491d010d46cfb25d043 upstream.

I was seeing some really weird behaviour where piping UML's output
somewhere would cause output to get duplicated:

  $ ./vmlinux | head -n 40
  Checking that ptrace can change system call numbers...Core dump limits :
          soft - 0
          hard - NONE
  OK
  Checking syscall emulation patch for ptrace...Core dump limits :
          soft - 0
          hard - NONE
  OK
  Checking advanced syscall emulation patch for ptrace...Core dump limits :
          soft - 0
          hard - NONE
  OK
  Core dump limits :
          soft - 0
          hard - NONE

This is because these tests do a fork() which duplicates the non-empty
stdout buffer, then glibc flushes the duplicated buffer as each child
exits.

A simple workaround is to flush before forking.

Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-03 15:06:23 -08:00
..
drivers mconsole: we'd better initialize pos before passing it to vfs_read()... 2013-06-19 12:37:57 +04:00
include um: Implement probe_kernel_read() 2013-09-26 17:18:29 -07:00
kernel vm: add VM_FAULT_SIGSEGV handling support 2015-04-29 10:34:00 +02:00
os-Linux uml: flush stdout before forking 2016-03-03 15:06:23 -08:00
scripts um: Preinclude include/linux/kern_levels.h 2012-09-27 20:20:09 +02:00
sys-ia64
sys-ppc dump_stack: unify debug information printed by show_regs() 2013-04-30 17:04:02 -07:00
.gitignore um: tell git to ignore generated files 2010-03-06 11:26:28 -08:00
Kconfig.char um: clean Kconfig up a bit 2011-11-02 14:15:29 +01:00
Kconfig.common um: Skip futex_atomic_cmpxchg_inatomic() test 2015-01-27 07:52:33 -08:00
Kconfig.debug lib: consolidate DEBUG_STACK_USAGE option 2011-05-25 08:39:54 -07:00
Kconfig.net arch/um: remove depends on CONFIG_EXPERIMENTAL 2013-01-11 11:38:04 -08:00
Kconfig.rest um: switch to use of drivers/Kconfig 2011-11-02 14:15:41 +01:00
Kconfig.um arch/um: remove depends on CONFIG_EXPERIMENTAL 2013-01-11 11:38:04 -08:00
Makefile UAPI: Partition the header include path sets and add uapi/ header directories 2012-10-02 18:01:26 +01:00
Makefile-ia64
Makefile-os-Linux
Makefile-ppc
Makefile-skas
defconfig Merge branch 'for-linus-3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml 2012-08-01 16:45:02 -07:00