time for 1.5.11?

Pierre A. Humblet pierre.humblet@ieee.org
Thu Jun 10 19:10:00 GMT 2004



Igor Pechtchanski wrote:
>
> 
> Ok, it turns out that to fix this properly, we'll need a much larger patch
> than the one line I was looking at...  Here are some thoughts.
> 
> First off, my guess above was wrong.  The IO handle has nothing to do with
> this -- fhandler_dev_dsp doesn't use it.  However, the intuition (I still
> think) was correct: some fields, namely the audio_in_ and audio_out_
> pointers, weren't replicated on dup(), so the new (duped) object ended up
> with NULL fields, and couldn't write to them.
> 
> The simplest solution to the above is to simply copy the pointers.  This
> will work for the test program I provided earlier, but won't for another
> legitimate test program (attached) that closes the original handle before
> using the duped one (I think this behavior is allowed).
> 
> The "proper" way to fix this, IMO, would be to allow sharing the audio_in_
> and audio_out_ objects, and have some sort of reference count in them,
> instead of deleting them outright in close().  

FWIW, this reminds me of the archetype concept that cgf has built into cygwin.
It's currently used for ttys.

Pierre



More information about the Cygwin-developers mailing list