[RFU][1.3.9-2] pv‏

Aaron Schneider notstop2@users.sourceforge.net
Mon Dec 10 14:56:00 GMT 2012


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.



More information about the Cygwin-apps mailing list