Questions tagged [named-pipes]

A named pipe is an inter-process communication mechanism, which exists both on Unix and Unix-like systems (where it is also known as a FIFO and is file-like), and on Microsoft Windows (where it is an in-memory kernel object). The semantics and APIs differ substantially between the platforms.

Unix

On Unix and Unix-like systems a named pipe (also known as a FIFO for its behavior) is an extension to the traditional pipe concept, and is one of the methods of inter-process communication.

A traditional pipe is "unnamed" because it exists anonymously and persists only for as long as the process is running. A named pipe is system-persistent and exists beyond the life of the process and must be deleted once it is no longer being used. Processes generally attach to the named pipe (usually appearing as a file) to perform inter-process communication (IPC).

Windows

On Windows operating systems a named pipe is a named kernel object which provides duplex data transfers between two processes, a pipe server and a pipe client. Multiple completely independent instances of a particular named pipe object can be created, each connecting the pipe server to exactly one client. A pipe instance persists only as long as its server and client processes keep a handle referencing it.

Communication between the server and client via a pipe instance may be either stream-oriented or message-oriented.

1850 questions
7
votes
3 answers

Hyper-V: Connecting VMs through named pipe loses data

We are trying to connect two Hyper-V VMs through a serial port. Hyper-V exposes the serial port as a named pipe to the host system, and implements the server end of the named pipe. Consequentially, to connect them, we need to write a named-pipe…
Martin v. Löwis
  • 124,830
  • 17
  • 198
  • 235
7
votes
4 answers

How to see named pipe permission from command line on windows

I've got an existing named pipe, say \\.\pipe\my_pipe. How can I, from cmd or powershell, get the ACL/Permissions of the pipe ?
Pierre Gayvallet
  • 2,933
  • 2
  • 23
  • 37
7
votes
2 answers

Using NamedPipeServerStream and NamedPipeClientStream asynchronously

I have the following requirements for a server/client architecture: Write a server/client that works asynchronously. The communication needs to be a duplex, i.e., reads and writes on both ends. Multiple clients can connect to the server at any…
iam3yal
  • 2,188
  • 4
  • 35
  • 44
7
votes
1 answer

Named Pipe Communication between Node.js and .net

I am working on an inter-process communication between a .net (v4.5.2) and Javascript node.js (v8.9.0) application. I want to use Windows named pipes for this (and only named pipes). For the Javascript application, I am using the named-pipes package…
Mouse On Mars
  • 1,086
  • 9
  • 28
7
votes
0 answers

Logrotate for processes which never close log file descriptors

I was wondering what are my options when it comes to doing logrotate for processes which never close their file descriptors. I am aware of the "restart the service" and copytruncate option. However, assuming that restarting the process is…
synepis
  • 1,292
  • 16
  • 28
7
votes
2 answers

How to respond conditionally based on the request when using netcat

I am trying to set up a web server using only windows batch scripting. I have already come up with the following script: @echo off @setlocal enabledelayedexpansion for /l %%a in (1,0,2) do ( type tempfile.txt | nc -w 1 -l -p 80 | findstr…
utxeee
  • 953
  • 1
  • 12
  • 24
7
votes
1 answer

Can named pipe names have backslashes?

According to MSDN, [The pipe name] must have the following form: \\.\pipe\pipename The pipename part of the name can include any character other than a backslash, including numbers and special characters. The entire pipe name string can…
GBegen
  • 6,107
  • 3
  • 31
  • 52
7
votes
1 answer

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

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…
rsutormin
  • 1,629
  • 2
  • 17
  • 21
7
votes
2 answers

IPC: Using of named pipes in c++ between two programs

I'm trying to realise a IPC between two different programs running on the same machine (in my case its a CentOS7). To have just a kind of loose coupling I decided to use a named pipe for the IPC. Therefore I'm was playing with the following example…
FredFloete
  • 627
  • 2
  • 13
  • 33
7
votes
6 answers

How do I synchronize two processes?

I have a single HW interface I want to use from two applications (processes) on the same workstation. The HW requires a single initialization call then either app uses the same function (in the same library) to do many transactions with the HW. So…
humble_guru
  • 526
  • 1
  • 3
  • 3
7
votes
1 answer

Read a filestream (named pipe) with a timeout in Smalltalk

I posted this to the Squeak Beginners list too - I'll be sure to make sure any answers from there get here :) I'm using Squeak 4.2 and working on the smalltalk end of a named pipe connection, which sends a message to the named pipe server with: …
dsl101
  • 1,715
  • 16
  • 36
7
votes
1 answer

bash: Are writes to named pipes atomic?

I'm trying to parallelize the processing of a file set using bash. I'm using named pipes for keeping number of process fixed and to gather output from the processes. I'm assuming that the writes to named pipe are atomic, i.e the output of different…
neon
  • 462
  • 6
  • 17
7
votes
1 answer

Why are pipes considered dangerous to use in Windows/unix/linux?

Why are pipes considered dangerous to use? What can be done to avoid these security issues? I'm mostly interested in Windows, but if you have other OS information, please provide.
Brian R. Bondy
  • 339,232
  • 124
  • 596
  • 636
7
votes
3 answers

SqlConnection stuck on Named Pipes

I'm seeing the following error when attempting to open a DB connection from within my C# application. I realize this error has probably shown up on 100's of questions before. However, in this scenario the error is only showing up on C# apps running…
Jay Lee
  • 71
  • 1
  • 3
7
votes
1 answer

Create named pipe in Ruby

I am trying to create a named pipe inside Ruby. Besides using the system command (system("mkfifo #{pipe_name}")), is there a native Ruby function allowing me to do this?
Yang Guan
  • 81
  • 1
  • 5