This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Opening a socket connection in a fork ?


Hello,
I'm trying to run a program on cygwin that forks, opens a socket
connection and sends the status of the connection to the parent
process using pipes. The parent process then sends data through the
opened socket.
The program works well on linux but on cygwin, i cannot use recv on a
socket opened in a fork. The recv function always return -1, errno 22
("EINVAL").
The weird thing is that the socket stays open and send still works...

I attached a short example.
I don't know if this is a bug or a limitation due to the fork()
implementation in cygwin... I searched on google but couldn't find
anything really useful.


Gu1

Attachment: test.c
Description: Binary data

--
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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]