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: [1.7] fifo regression


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Eric Blake on 7/6/2009 7:03 AM:
> But on cygwin 1.7, when you attempt to create multiple writers to a single
> fifo, the second writer creates an fd just fine but then fails on any
> attempt to write to that fd:
> 
> $ mkfifo fifo
> $ (exec 5>fifo; sleep 25; echo one >&5)&
> [1] 4200
> $ (exec 5>fifo; sleep 15; echo two >&5)&
> [2] 204

It appears that part of the problem is that cygwin is violating POSIX - a
process that opens a fifo for writes must block until a corresponding
process opens the same fifo for reads, but cygwin is creating the fd
without blocking.  A pstree at this point shows that the sleep processes
have already been spawned...

> $ exec 5<fifo

...even though on Linux, the sleeps cannot spawn until after this point.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkpR+DsACgkQ84KuGfSFAYBfLQCfY+IozoBQWjQaohizEcOjgXLt
CMYAoMTHprULJoeVp+i38N4Kjrv/HCHq
=VCM7
-----END PGP SIGNATURE-----

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