FAQ Database Discussion Community


Pipe ffmpeg output to named pipe

linux,ffmpeg,named-pipes
I'm trying to get ffmpegs output to a named pipe, where I could read from another shell. I do not need the video stream piped, just the informations below to get a state of the conversion process back. I am not able to achieve the piping behavior in any way,...

Programically get the system name of named pipe

c#,.net,wcf,wcf-binding,named-pipes
I am writing a inter-process comunication using WCF NetNamedPipeBinding. My goal is to have service running at "net.pipe://localhost/service", so I running the simplest host: host = new ServiceHost(contract, new Uri[] { "net.pipe://localhost" }); host.AddServiceEndpoint(typeof (IContract), new NetNamedPipeBinding(), "service"); host.Open(); According to http://blogs.msdn.com/b/rodneyviana/archive/2011/03/22/named-pipes-in-wcf-are-named-but-not-by-you-and-how-to-find-the-actual-windows-object-name.aspx the name is hidden behind...

C++ Windows Asynch IO Named Pipe first message not received

c++,windows,winapi,named-pipes
Modified code from Named Pipe Server Using Overlapped I/O https://msdn.microsoft.com/en-us/library/windows/desktop/aa365603(v=vs.85).aspx The server code is as follows: #include <windows.h> #include <stdio.h> #include <tchar.h> #include <strsafe.h> #include <iostream> #define CONNECTING_STATE 0 #define READING_STATE 1 #define INSTANCES 4 #define PIPE_TIMEOUT 5000 #define BUFSIZE 4096 typedef struct { OVERLAPPED oOverlap; HANDLE hPipeInst; TCHAR chRequest[BUFSIZE];...

open on FIFO (named pipe) freezes - ignores SIGINT, SIGTERM

c++,linux,signals,named-pipes,freeze
I'm using named pipes to communicate between forked processes. Each process handles SIGINT and SIGTERM and then closes its end of the pipe and cleans up. If the signal happens right when I fork a process, the process then hangs while trying to open the pipe (because the other end...

Strange syntax for a redirection

bash,pipe,named-pipes,pipeline,io-redirection
I just came across the following script while browsing this question: rm -f out mkfifo out trap "rm -f out" EXIT while true do cat out | nc -l 1500 > >( # parse the netcat output, to build the answer redirected to the pipe "out". export REQUEST= while read...

How to make named pipes in bash

bash,named-pipes
This program works great, but how do I go from supporting 2 files to supporting n files using the same [un]named pipe approach? some_command \ <(tar c --xattrs -C "$1" --pax-option="exthdr.name=%d/PaxHeaders/%f" . | xxd) \ <(tar c --xattrs -C "$2" --pax-option="exthdr.name=%d/PaxHeaders/%f" . | xxd) ...

Multiple pipes in subprocess

python,pipe,subprocess,named-pipes
I am trying to use Sailfish, which takes multiple fastq files as arguments, in a ruffus pipeline. I execute Sailfish using the subprocess module in python, but <() in the subprocess call does not work even when I set shell=True. This is the command I want to execute using python:...

Named pipes and OVERLAPPED on Windows

winapi,named-pipes
I'm about to implement my first Windows service. The service will connect to a Bluetooth dongle, and liaison some commands and data to a single client process. Each process (client, server), shall have at least two thread - one blocking on Read(), another crunching business logic and doing an occasionally...

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

sql-server-2008,connection-string,named-pipes,sql-server-config-manager
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 migrated to SQL Server 2008 R2 and I need to update the .ini file to...

Issues with FIFO between a C process and a JAVA application

java,c,ipc,named-pipes,fifo
I have 2 applications, one written in C and the other in JAVA. Lets call these applications 'C' and 'JAVA'. C Creates a named pipe via mkfifo (have also tried mknod - no difference to the outcome) C forks off with the child process invoking a system() call to fire-up...

is it possible to restrict remote machines to connect to NamedPipeServerStream?

c#,remote-access,named-pipes
i wanted to know if it's possible to restrict remote machines to access named pipe in a server. i'm initializing the server as follows: NamedPipeServerStream pipeServer = new NamedPipeServerStream("myPipe", PipeDirection.InOut, NamedPipeServerStream.MaxAllowedServerInstances, PipeTransmissionMode.Byte, PipeOptions.Asynchronous); the remote client does: using (NamedPipeClientStream pipeStream = new NamedPipeClientStream(serverIP, "myPipe", PipeDirection.InOut)) { pipeStream.Connect(2000); } and of...

Stubbing WinBase.h in cppunit test

c++,unit-testing,named-pipes,cppunit
I'm writing a unit test for a class that uses named pipes. I need to stub CreateNamedPipe, ConnectNamedPipe, WriteFile, ReadFile, FlushFileBuffers, DisconnectNamedPipe, CloseHandle, and GetLastError These are all defined in WinBase.h as dll imports. Unfortunately WinBase.h is a gigantic file that's used everywhere, so one can't merely stub out the...

need to choose between NamedPipe or UDP

c#,.net,udp,named-pipes,udpclient
I had an argument with a colleague on the selection. We have two processes running on the same machine. => NamedPipe and UDP are KERNEL OBJECT so as far as i understand this is same overhead. The advantage of UDP is that if tomorrow we will separate those two processes...

Order of opening named pipes causing possible race condition?

c,pipe,ipc,named-pipes
I am trying to create a very basic client server communication between two processes using IPC via named pipes. I have 2 pipes, namely fifo_client and fifo_server I have the following two classes fifoclient.c and fifoserver.c that has the following lines of code to open the two pipes. fifoclient.c int...

how to avoid deadlock with parallel named pipes?

linux,shell,unix,named-pipes,fifo
I am working on a flow-based programming system called net2sh. It is currently based on shell tools connected by named pipes. Several processes work together to get the job done, communicating over named pipes, not unlike a production line in a factory. In general it is working delightfully well, however...

100% CPU usage when reading named pipe in Go

go,named-pipes
I have a short Go program which reads from a named pipe and processes each line as an external process writes to the pipe. The named pipe is created before the program runs using mkfifo. The process is taking up 100% of the CPU when waiting for a new line...