Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com To: cygwin AT cygwin DOT com From: John =?utf-8?b?T1wnTGVhcnk=?= Subject: popen/pclose: unexpected behavior Date: Mon, 3 Oct 2005 18:38:15 +0000 (UTC) Lines: 31 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit User-Agent: Loom/3.14 (http://gmane.org/) X-IsSubscribed: yes Hello, The following program hangs when its pipes are closed in the same order in which they were opened, and terminates when its pipes are closed in the reverse order. I've never seen this on other platforms - it a bug? Or is there a subtlety I'm unaware of? Thanks --John ---------------------------------------- #include int main (void) { FILE *pipe1; FILE *pipe2; pipe1 = popen ("cat", "w"); pipe2 = popen ("cat", "w"); /* hangs unless pipes are pclosed in order pipe2,pipe1 */ pclose (pipe1); pclose (pipe2); return 0; } -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/