From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4777 invoked by alias); 20 Jan 2016 11:47:22 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 4433 invoked by uid 89); 20 Jan 2016 11:47:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=4.2 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE,UNSUBSCRIBE_BODY autolearn=no version=3.3.2 spammy=H*RU:sk:smtprel, Hx-spam-relays-external:sk:smtprel, HX-HELO:sk:smtprel, H*r:sk:smtprel X-HELO: smtprelay.hostedemail.com Received: from smtprelay0111.hostedemail.com (HELO smtprelay.hostedemail.com) (216.40.44.111) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 20 Jan 2016 11:47:20 +0000 Received: from filter.hostedemail.com (unknown [216.40.38.60]) by smtprelay05.hostedemail.com (Postfix) with ESMTP id 75AF82691E0 for ; Wed, 20 Jan 2016 11:47:18 +0000 (UTC) X-Session-Marker: 6A62656E6973746F6E40756B322E6E6574 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,jon@beniston.com,:,RULES_HIT:10:41:355:379:541:542:960:968:973:988:989:1155:1260:1277:1311:1313:1314:1345:1381:1437:1515:1516:1518:1534:1541:1587:1593:1594:1711:1730:1747:1777:1792:2110:2393:2559:2562:2689:3138:3139:3140:3141:3142:3352:3865:3866:3867:3870:3871:3872:3874:4184:4605:5007:6117:6119:7903:8660:8957:10004:10400:10848:11658:11914:12043:12296:12517:12519:12663:13069:13071:13095:13148:13230:13311:13357:14093:14097:21060:21080:21094:30054,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: crown41_3fb871d06704f X-Filterd-Recvd-Size: 1864 Received: from LoftPC (cpc22-croy19-2-0-cust300.19-2.cable.virginm.net [82.43.175.45]) (Authenticated sender: jbeniston@uk2.net) by omf07.hostedemail.com (Postfix) with ESMTPA for ; Wed, 20 Jan 2016 11:47:17 +0000 (UTC) From: "Jon Beniston" To: Subject: expect - broken pipe Date: Wed, 20 Jan 2016 12:57:00 -0000 Message-ID: <000c01d15378$52e56000$f8b02000$@beniston.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-01/txt/msg00237.txt.bz2 Hi, I'm trying to run the GCC DejaGNU testsuite on 32-bit Cygwin. It randomly fails with the message: "parent: sync byte write: broken pipe" This occurs frequently if the testsuite is run in parallel (i.e. make -j4), but occasionally when not in parallel too. It seems this error message is generated by the 'expect' program, specifically from exp_command.c. This does roughly the following: pipe(sync_fds); pipe(sync2_fds); . pid = fork(); if (pid) { /* parent */ close(sync_fds[1]); close(sync2_fds[0]); /* wait for slave to initialize */ while (((rc = read(sync_fds[0],&sync_byte,1)) < 0) && (errno == EINTR)) { /* empty */; } ... /* tell slave to go on */ wc = write(sync2_fds[1]," ",1); if (wc == -1) { expErrorLog("parent: sync byte write: %s\r\n",Tcl_ErrnoMsg(errno)); } So, the write to the pipe is failing randomly with errno==EPIPE. Any idea why this might be? What is strange, is if I remove the call to close(sync2_fds[0]), then the write never fails. Closing the unused end of the pipe seems fairly standard behaviour as that is what is given as an example in the pipe() man page. Cheers, Jon -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple