public inbox for cygwin-developers@cygwin.com
 help / color / mirror / Atom feed
* Shared memory
@ 2020-02-27 20:35 Ken Brown
  2020-02-28 11:41 ` Corinna Vinschen
  0 siblings, 1 reply; 2+ messages in thread
From: Ken Brown @ 2020-02-27 20:35 UTC (permalink / raw)
  To: cygwin-devel

Hi Corinna,

I think I see how to enable FIFOs to be opened for reading multiple times, by 
using shared memory to maintain data needed by all readers.

To this end I'm trying to imitate some of what you did in 
fhandler_socket_unix.cc, and I find I'm confused about the use of reopen_shmem. 
When this is called by fhandler_socket_unix::dup, shouldn't the call actually be

   fhs->reopen_shmem () ?

It's the new fhandler that needs to open the shared memory, isn't it?  Or am I 
misunderstanding something?

Thanks.

Ken

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Shared memory
  2020-02-27 20:35 Shared memory Ken Brown
@ 2020-02-28 11:41 ` Corinna Vinschen
  0 siblings, 0 replies; 2+ messages in thread
From: Corinna Vinschen @ 2020-02-28 11:41 UTC (permalink / raw)
  To: cygwin-developers

[-- Attachment #1: Type: text/plain, Size: 785 bytes --]

On Feb 27 15:35, Ken Brown wrote:
> Hi Corinna,
> 
> I think I see how to enable FIFOs to be opened for reading multiple times,
> by using shared memory to maintain data needed by all readers.
> 
> To this end I'm trying to imitate some of what you did in
> fhandler_socket_unix.cc, and I find I'm confused about the use of
> reopen_shmem. When this is called by fhandler_socket_unix::dup, shouldn't
> the call actually be
> 
>   fhs->reopen_shmem () ?
> 
> It's the new fhandler that needs to open the shared memory, isn't it?  Or am
> I misunderstanding something?

You're right.  And then it's also called too early.
It should only be called after fhs->shmem_handle is valid.

I applied a patch.


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-02-28 11:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-27 20:35 Shared memory Ken Brown
2020-02-28 11:41 ` Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).