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
12
votes
1 answer

Python code hangs while trying to open a named pipe for reading

I am trying to setup two way communication between a daemon and a client using named pipes. The code hangs while trying to open the named pipe used for input Why? class comm(threading.Thread): def __init__(self): self.srvoutf =…
T_Mac
  • 223
  • 3
  • 10
12
votes
2 answers

SQL Server Error "Named Pipes Provider: Could not open a connection to SQL Server [53]"

I used to have a desktop application pointing to a Sybase database through an .ini file that had this connection string: CONNECTION_NAME = "DSN="Dna_Name";UID="User";PWD="Password"" It worked perfectly. A few days ago the database has been…
12
votes
1 answer

Poll() on Named Pipe returns with POLLHUP constantly and immediately

I open a named pipe (fifo created by mkfifo) with non blocking flag (open(...O_NONBLOCK)) then start polling (poll(...)). So far so good. Then from the command line I do a couple of echo 123 > /tmp/fifo They are all read out of the pipe as…
Steven Spark
  • 378
  • 2
  • 11
11
votes
1 answer

NamedPipeServerStream.EndWaitForConnection() just hangs when used

I'm trying to use named pipes for the first time. In the MS documentation found here, it states that: EndWaitForConnection must be called exactly once for every call to BeginWaitForConnection. So I'm trying to be a good little programmer and…
Ultratrunks
  • 2,464
  • 5
  • 28
  • 48
11
votes
1 answer

There was an error writing to the pipe: Unrecognized error 232 (0xe8)

I call a method in a WCF proxy, where the binding is named pipes. At the moment, the code fails with an exception (related to wmi - what the code does), but when I then execute another method in the same proxy, I get this error: There was an error…
GurdeepS
  • 65,107
  • 109
  • 251
  • 387
11
votes
2 answers

How to set PipeSecurity of NamedPipeServerStream in .NET Core

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…
uncaged
  • 597
  • 1
  • 5
  • 17
11
votes
4 answers

NamedPipeServerStream.ReadAsync() does not exit when CancellationToken requests cancellation

When the NamedPipeServer stream reads any data from the pipe it does not react to CancellationTokenSource.Cancel() Why is that? How can I limit the time I'm waiting in the server for data from the client? Code to reproduce: static void Main(string[]…
inwenis
  • 368
  • 7
  • 24
11
votes
2 answers

Check whether named pipe/FIFO is open for writing

I've created a named pipe for some other process to write to and want to check that the other process started correctly, but don't know its PID. The context is running a command in screen, making sure the command started correctly. I was hoping this…
jozxyqk
  • 16,424
  • 12
  • 91
  • 180
11
votes
1 answer

Minimum OS Permissions required to create named pipe (WCF)

I have an exe that runs under the context of the logged-in user. The exe uses WCF to make itself a named pipe server (it will be called by multiple clients). Does the user need a specific permission for the exe to be able to create the named pipe?…
Paul Nearney
  • 6,965
  • 2
  • 30
  • 37
11
votes
1 answer

Win32 named pipes and message size limits - is the old 64K limit still applicable?

Win32 used to have a message size limit of 64K for message-mode pipes, as witnessed by the remnants of KB article Q119218 PRB: Named Pipe Write() Limited to 64K. The "applies to" section lists only "Microsoft Win32 Application Programming Interface"…
DarthGizka
  • 4,347
  • 1
  • 24
  • 36
11
votes
2 answers

Expose a WCF Service through a Named Pipes binding

Intro: I successfully implemented a WCF Service hosted in a Windows Service a few days ago. The community here at StackOverflow helped me with the WSDL exposure here. I thank you once again. However recently I found out that there is another…
Andrei Rînea
  • 20,288
  • 17
  • 117
  • 166
11
votes
2 answers

mkfifo file permissions not being executed correctly

The following line in my C program should provided All/Group/Owner read and write permissions mkfifo("/tmp/dumbPipe", 0666) But once I execute the code and check out the permission non of the write bits were set, I end up with prw-r--r-- The…
whatWhat
  • 3,987
  • 7
  • 37
  • 44
11
votes
2 answers

Named Pipes, How to know the exact number of bytes to read on Reading side. C++, Windows

I am using Named Pipes configured to send data as a single byte stream to send serialized data structures between two applications. The serialized data changes in size quite dramatically. On the sending side, this is not a problem, I can adjust the…
Rudolf
  • 143
  • 1
  • 8
11
votes
6 answers

How to send object through NamedPipe in .NET 3.5?

Can you tell me what's the best way to send objects through NamedPipes in .net 3.5?
kyrisu
  • 4,541
  • 10
  • 43
  • 66
10
votes
3 answers

Win32 named pipes and remote clients

Can I access a named pipe on computer A from computer B given computer A's IP address? If so, what do I need to do to make this happen?
Voyager Systems