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]

Re: ipc, sockets and windows sp2

On Apr  8 17:10, wrote:
> it works for me too for the testcase i provided last time.
> But there is still some issues when you run several semaphore-using 
> program at the same time.

[Insert swear-word here]

> to reproduce it :
> -compil last testcase with this modification :
> -- if (n_children < 20)
> instead of
> -- if (n_children < 1)
> at the beginning of the main loop
> and change
> -- usleep(10)
> to
> -- sleep(1)
> so childs does not disappear too quickly.
> -compile it, and copy the binary in another place (like /tmp), so you 
> can run two instance of it (as semaphore key is created from the path, 
> must have different path).
> -then run both of them, you should see
> --semaphore_lock: Identifier removed
> messages, and your semaphores aren't locked.
> you can give -r 64 argument to cygserver to be sure that it is not a 
> query thread number issue.

Again the thread synchronization was the culprit.  I reworked it once
again and I ran your testcase 5 times concurrently with different sleep
values, some in the same, some in different directories.  It works for
me again.  Please test and tell me that it solves all your problems
and nothing's left, ok?


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader
Red Hat, Inc.

Unsubscribe info:
Problem reports:

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