X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Content-Type: text/plain; charset="us-ascii" Date: Mon, 03 Mar 2008 15:22:40 +0100 From: spambouncer AT gmx DOT de Message-ID: <20080303142240.137090@gmx.net> MIME-Version: 1.0 Subject: open() FIFO not blocking To: cygwin AT cygwin DOT com X-Authenticated: #24403641 X-Flags: 0001 X-Mailer: WWW-Mail 6100 (Global Message Exchange) Content-Transfer-Encoding: 7bit X-GMX-UID: hzH6dr8GYmYBf49pEXY3qWZCWkZTQRSI Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 Hi everyone! Using the cygwin API on WinXP, I'm trying to set up communication between a client and a server app via a FIFO. Although the open() calls are supposed to block until the other end of the FIFO is connected, they return immediately. What's wrong? Here's the source code for the client app. The server app basically does the same, except for opening the FIFO with O_RDONLY. #include #include #include #include #include #include #include using namespace std; const char FIFO_NAME[]="SomeFifo"; int main(int argc, char* argv[]) { if(mkfifo(FIFO_NAME, 0666) != 0) { if(errno!=EEXIST) { perror("client: mkfifo"); return -1; } } cout << "client: waiting for readers..." << endl; int fd=open(FIFO_NAME, O_WRONLY); if(fd==-1) { perror("client: open"); return -1; } cout << "client: got a reader!" << endl; // write stuff to the fifo return 0; } -- Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten Browser-Versionen downloaden: http://www.gmx.net/de/go/browser -- 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/