Opening a socket connection in a fork ?

Gu1ll4um3r0m41n aeroxteam@gmail.com
Wed Sep 16 20:16:00 GMT 2009


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.c
Type: application/octet-stream
Size: 2522 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20090916/e713c822/attachment.obj>
-------------- next part --------------
--
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


More information about the Cygwin mailing list