named-pipes

Named pipe wait for client in background until client connects

ⅰ亾dé卋堺 提交于 2019-12-24 08:13:09
问题 I'm trying to make my named pipe server skip the block-wait of the ConnectNamedPipe function until my client tries to connect. So I want is for my code to continue past the ConnetNamedPipe line until the end but keep the connection for my pipe open in the backgroun. If I use the PIPE_NOWAIT mode when creating the pipe it just returns imediatelly and the pipe closes before my client can connect. I know that I tried doing this using a thread but even when I create a thread and execute the

Named pipes: C# server, C++ client

陌路散爱 提交于 2019-12-24 01:25:57
问题 I wrote 2 pairs of named pipe client/server programs: 1st pair in C# (.NET 4) 2nd pair in C++ (un-managed) All 4 test programs use the same pipe name \\.\pipe\mypipe The C# pair work fine with each other - I send a message from the client and it is received by the server. The C++ pair work also fine with each other. But... when I try to run the C# client with the C++ server, or the C++ client with the C# server - then it doesn't work. The client is unable to connect to the server. Is there

Capture non-zero exit code from named pipe

徘徊边缘 提交于 2019-12-24 00:24:31
问题 The following toy script ( tmp.sh ) exits with code 0 even if the process sent to the named pipe fails. How can I capture the non-zero exit code from the named pipe? Or more in general, the fact that something has gone wrong? #!/bin/bash set -eo pipefail mkfifo mypipe FOOBAR > mypipe & cat mypipe Run and check exit code: bash tmp.sh tmp.sh: line 6: FOOBAR: command not found echo $? # <- Exit code is 0 despite the "command not found"! 回答1: You need to capture process id of background process

How do I block on reading a named pipe in Ruby?

时间秒杀一切 提交于 2019-12-23 11:59:55
问题 I'm trying to set up a Ruby script that reads from a named pipe in a loop, blocking until input is available in the pipe. I have a process that periodically puts debugging events into a named pipe: # Open the logging pipe log = File.open("log_pipe", "w+") #'log_pipe' created in shell using mkfifo ... # An interesting event happens log.puts "Interesting event #4291 occurred" log.flush ... I then want a separate process that will read from this pipe and print events to the console as they

How to host net named pipe binding enabled wcf application in iis?

喜你入骨 提交于 2019-12-23 10:12:04
问题 I have a following configuration in my wcf service <endpoint address="" binding="netNamedPipeBinding" contract="WcfWithNamedPipe.IService1" bindingConfiguration="WcfWithNamedPipe.netNamedPipeBinding"> </endpoint> can any one suggest me how to host this wcf service in iis using netNamedPipe binding? 回答1: To get Named pipes to work on IIS you must enable Windows Process Activation Service (WAS) on IIS and configure the site that you are using to allow named pipes. For details see: http://msdn

Serial numbers, created and modified in SQL Server

微笑、不失礼 提交于 2019-12-23 10:10:01
问题 I'm needing to add serial numbers to most of the entities in my application because I'm going to be running a Lucene search index side-by-side. Rather than having to run an ongoing polling process, or manually run my indexer by my application I'm thinking of the following: Add a Created column with a default value of GETUTCDATE() . Add a Modified column with a default value of GETUTCDATE() . Add an ON UPDATE trigger to the table that updates Modified to GETUTCDATE() (can this happen as the

Communication between windows service and desktop app

。_饼干妹妹 提交于 2019-12-23 09:37:57
问题 I want to create a communication between a windows service and a desktop application on Windows 7. I read that named pipes are one way for communication between two processes. Can i use them for my purpose? 回答1: sure you can use named pipes, WCF many other IPC methods. for named pipe example among stack overflow questions, see here as well for some backgound: Inter process communication using Windows service also check this one: GUI and windows service communication 回答2: As indicated above,

Can named pipe names have backslashes?

两盒软妹~` 提交于 2019-12-23 09:07:59
问题 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 be up to 256 characters long. Pipe names are not case sensitive. But there are plenty of examples where I've seen named pipe names with backslashes in them. For example, the standard pipe name for SQL Server is \\.\pipe\sql\query . Running PipeList from

Writing mulitple times in a special (given) pipe C++

╄→尐↘猪︶ㄣ 提交于 2019-12-23 05:20:23
问题 I try to handle some pipes in a CAD Programm with c++. The programm Geograf has two pipes. They are both in the following path: \.\pipe\GGPIPE The interesting on this pipe is, that I have to open a pipe then close a pipe and open a pipe again. After this steps, I can send commands through the pipe to Geograf. My problem or question is, why I can write to pipe the only one time ? After I excecute my program the second time, the handle have a INVALID_HANDLE_VALUE. If I want to send a command

WCF HTTP and NamedPipe service

萝らか妹 提交于 2019-12-23 04:03:42
问题 I'm creating a WCF service which, at the moment, exposing a number of contracts using a basicHttpBinding. However, I now want to use the service locally on the same machine, and a netNamedPipeBinding seems more appropriate in terms of performance. For that reason, I want to expose the service using a named pipe and HTTP. At the moment I'm doing this with the following configuration: <service name="WCFService.MyService" behaviorConfiguration="serviceBehaviour"> <host> <baseAddresses> <add