named-pipes

How to set PipeSecurity of NamedPipeServerStream in .NET Core

落爺英雄遲暮 提交于 2021-01-27 22:55:29
问题 I'm porting a library from .NET Framework 4.6.1 to .NET Standard 2.0. In Framework, the NamedPipeServerStream constructor could take a PipeSecurity parameter, but that isn't an option in Core. How do you set the security of a NamedPipeServerStream in Core? 回答1: Apparently it's a known issue System.IO.Pipes.AccessControl package does not work #26869. There's a workaround mentioned in the last post suggesting usage of NamedPipeServerStream.NetFrameworkVersion nuget package which will expose

How to verify an outbound-only server-end pipe handle is a pipe?

狂风中的少年 提交于 2021-01-27 06:57:09
问题 I want to create an outbound-only named pipe, and I want other code elsewhere to later be able to check if that handle is a pipe. This works for all cases of pipe handles (client, server; outbound, inbound), EXCEPT server-end handles to outbound-only pipes. If I open a handle to the client end of an inbound-to-server-only pipe with access flags GENERIC_WRITE | FILE_READ_ATTRIBUTES , I can later verify the handle is a pipe by calling GetNamedPipeInfo(handle,NULL,NULL,NULL,NULL) , which returns

Named pipes in docker container folder mounted to mac os x file system through boot2docker

牧云@^-^@ 提交于 2021-01-27 04:21:49
问题 I'm working on wrapping some scientific software by docker image using boot2docker on Mac OS X. And that software (https://github.com/voutcn/megahit.git) is using named pipes (in python code, but it's not important) to wire different parts (written in C) to each other. I mount temporary folder from host Mac OS X machine to provide scratch area in docker container (because temporary output of software could be huge) with something like this: docker run -v /external/folder:/tmp/scratch <image>

Duplex named pipe hangs on a certain write

放肆的年华 提交于 2021-01-20 20:22:12
问题 I have a C++ pipe server app and a C# pipe client app communicating via Windows named pipe (duplex, message mode, wait/blocking in separate read thread). It all works fine (both sending and receiving data via the pipe) until I try and write to the pipe from the client in response to a forms 'textchanged' event. When I do this, the client hangs on the pipe write call (or flush call if autoflush is off). Breaking into the server app reveals it's also waiting on the pipe ReadFile call and not

Duplex named pipe hangs on a certain write

点点圈 提交于 2021-01-20 20:21:47
问题 I have a C++ pipe server app and a C# pipe client app communicating via Windows named pipe (duplex, message mode, wait/blocking in separate read thread). It all works fine (both sending and receiving data via the pipe) until I try and write to the pipe from the client in response to a forms 'textchanged' event. When I do this, the client hangs on the pipe write call (or flush call if autoflush is off). Breaking into the server app reveals it's also waiting on the pipe ReadFile call and not

Read from n pipes from one process in parallel

三世轮回 提交于 2021-01-07 02:30:38
问题 I faced a concurrency problem when writing to the same named pipe created with mkfifo by multiple processes at the same time, where some writes got lost. Since the number of writing processes are limited I want to switch from "writing to 1 pipe from n processes and reading from 1 separate" to "writing to n pipes by n processes and reading from 1 separate process". Currently I'm reading via read line <"$pipe" in a loop until a condition is met. read blocks here until a line was read. How can I

Read from n pipes from one process in parallel

折月煮酒 提交于 2021-01-07 02:28:30
问题 I faced a concurrency problem when writing to the same named pipe created with mkfifo by multiple processes at the same time, where some writes got lost. Since the number of writing processes are limited I want to switch from "writing to 1 pipe from n processes and reading from 1 separate" to "writing to n pipes by n processes and reading from 1 separate process". Currently I'm reading via read line <"$pipe" in a loop until a condition is met. read blocks here until a line was read. How can I

which is better POSIX Message Queue or PIPES for producer consumer problem

你。 提交于 2020-08-20 11:09:50
问题 I have a producer Thread as well as consumer thread where producer runs faster than consumer i need to transfer data from producer and process it on consumer, producer will give an array of 1000 elements every second and consumer should wait till it has 10 sets of arrays and will process it (consumer runs every 10 seconds) i could see that we can modify POSIX message queue to input an array of 1000 elements double array which is a better method to transfer real data, POXIS message queue or

which is better POSIX Message Queue or PIPES for producer consumer problem

被刻印的时光 ゝ 提交于 2020-08-20 11:09:08
问题 I have a producer Thread as well as consumer thread where producer runs faster than consumer i need to transfer data from producer and process it on consumer, producer will give an array of 1000 elements every second and consumer should wait till it has 10 sets of arrays and will process it (consumer runs every 10 seconds) i could see that we can modify POSIX message queue to input an array of 1000 elements double array which is a better method to transfer real data, POXIS message queue or