This is the mail archive of the cygwin-apps 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: [RFU][1.3.9-2] pvâ


On Dec 10 15:56, Aaron Schneider wrote:
> Corinna Vinschen wrote:
> >Again, Cygwin supports SYSV IPC.  Please inform the original author that
> >the functionality depends on a running cygserver process.  If this
> >process is not running, the SYSV IPC functions return ENOSYS.
> >
> >IMHO there's no reason to exit if the msgget function returns ENOSYS.
> >The code could simply note the fact and proceed, and only return an
> >error if the user tried the -R option.
> >
> >SYSV message queue support in Cygwin exists, but it requires to run
> >cygserver.  If you want to avoid this dependency, you can use POSIX
> >message queues instead.
> >
> 
> I think it should be possible to get -R working in Cygwin without
> cygserver using temporary files to send the message. This isn't a
> great solution but it's a lot less work, and more portable, than
> trying to use POSIX message queues.

> The temporary file would be
> something like /tmp/pv-<EUID>-<PID>.msg, and would be opened with
> O_NOFOLLOW and O_EXCL to avoid symlinking attacks; does this sound
> like a reasonable plan?
> 
> Similarly, temporary files might work for replacing "-c" shared memory code.
> Does Cygwin support mmap()? I could mmap() a file of the form
> /tmp/pv-<TERMINAL>-shm.dat and use that to pass Y co-ordinate and
> process count information.

Cygwin supports mmap for a long time.  However,  I'm puzzled why
using POSIX message queues should be more work than implementing
the message transport from scratch.  This sounds much more error
prone than using an existing mechanism.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat


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