Subject: CVS commit: src/bin/sh
To: None <source-changes@NetBSD.org>
From: Christos Zoulas <christos@netbsd.org>
List: source-changes
Date: 07/08/2004 03:57:33
Module Name:	src
Committed By:	christos
Date:		Thu Jul  8 03:57:33 UTC 2004

Modified Files:
	src/bin/sh: redir.c

Log Message:
PR/25699: David Laight: sh(1) hangs opening a named pipe as stdin for
background process
This happens because we vfork, and then open a named pipe with O_RDONLY
and block in the child. We avoid this, by opening the file with O_NONBLOCK,
and then reset it if we are vforked. XXX: this is an ugly fix.


To generate a diff of this commit:
cvs rdiff -r1.28 -r1.29 src/bin/sh/redir.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.