This is the mail archive of the
mailing list for the Cygwin project.
Re: ipc, sockets and windows sp2
On Apr 1 13:05, Vincent Dedun wrote:
> So I hope you wouldn't mind I attached a short testing program you can
> easily compil with gcc to reproduce the bug.
Cool, that's exactly what I was asking for. I was immediately able to
reproduce the problem and it turned out, that on fork() the socket
duplication from parent to child process for some reason occupied space
in the child, which in the parent is occupied by the shared memory returned
Consequentially the duplication of the shared memory couldn't occupy the
same address as in the parent. That's a fatal error so the forked child
terminated itself with error 487, which basically means "Invalid address".
I've changed fork() so that the shared memory is duplicated before sockets
are duplicated, which is ok because sockets don't have special requirements
for memory addresses. That works fine for me, but it would be good if you
could test the next snapshot, which I just uploaded, nevertheless.
It's just incredible that nobody found this problem before.
Again, thanks for the testcase,
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader mailto:firstname.lastname@example.org
Red Hat, Inc.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html