named-pipes

SqlException: System.Data.SqlClient.SqlException (0x80131904)

谁说我不能喝 提交于 2019-11-29 16:07:57
I wrote a code in C#, which works great at my computer, with Windows 7 (MS SQL Server 2008) but not at the other with Windows Vista (MS SQL Server 2005). I can not change system on the second computer ;) I'm using Visual Studio 2010. So this is the part of code, from my class "obSQL": private SqlConnection connection; public obSQL(string user, string pass, string instance, string dbdir) //sql server authentication { connection = new SqlConnection(); connection.ConnectionString = "user id=" + user + ";" + "password=" + pass + ";Data Source=" + instance + ";" + "Trusted_Connection=no;" +

How do I read a FIFO/named pipe line by line from a C++/Qt Linux app?

醉酒当歌 提交于 2019-11-29 14:54:52
问题 How do I read a FIFO/named pipe line by line from a C++/Qt Linux app? Today I can open and read from a fifo from a Qt program, but I can't get the program to read the data line by line. Qt reads the entire file, meaning he waits until the "sender" closes his session. Let's take a example with some shell commands to show what I would like the app to do. First create a fifo mkfifo MyPipe Then we can use cat to read from the fifo cat MyPipe And then we send some data in with another cat cat >

Two way C++ to C# communication using named pipes

寵の児 提交于 2019-11-29 13:56:49
I am trying to have a 2-way communication between a VC++ 6 app and a C# app. I am using named pipes. In my C++ code I can read the message from the C# client but then the server "dies" and I have to restart it again. What I want to do is have the C# app connect to the C++ app, request a status, and the C++ app goes off and checks the status, and then returns either "busy" or "idle". I can't write anything back to the C# client as it says the connection has been closed. Some things I have commented out are things I have tried already. C++ code (started as a thread) UINT CNamedPipe:

How do I use exec 3>myfifo in a script, and not have echo foo>&3 close the pipe?

夙愿已清 提交于 2019-11-29 11:55:43
Why can't I use exec 3>myfifo in the same manner in a bash script as I can in my terminal? I'm using named pipes to turn an awk filter into a simple "server", that should be able to take text input from clients, filter it, and flush on NUL. In terminal 1, the server is running like this: $ mkfifo to_server from_server; $ while true; do # Really, this awk script BEGIN's with reading in a huge file, # thus the client-server model awk '{sub("wrong", "correct");print;} /\0/ {fflush();}' <to_server >from_server; echo "restarting..."; done And I've got a simple script that should put input, ending

Strange intermittent SQL connection error, fixes on reboot, comes back after 3-5 days (ASP.NET)

心不动则不痛 提交于 2019-11-29 11:46:50
For some reason every 3-5 days our web app loses the ability to open a connection to the db with the following error, the strange thing is that all we have to do is reboot the container (it is a VPS) and it is restored to normal functionality. Then a few days later or so it happens again. Has anyone ever had such a problem? I have noticed a lot of ANONYMOUS LOGONs in the security log in the middle of the night from our AD server which is strange, and also some from an IP in Amsterdam. I am not sure how to tell what exactly they mean or if it is related or not. Server Error in '/ntsb'

Breaking ReadFile() blocking - Named Pipe (Windows API)

淺唱寂寞╮ 提交于 2019-11-29 10:59:04
问题 To simplify, this is a situation where a NamedPipe SERVER is waiting for a NamedPipe CLIENT to write to the pipe (using WriteFile()) The Windows API that is blocking is ReadFile() The Server has created the synchronous pipe (no overlapped I/O) with blocking enabled The client has connected, and now the server is waiting for some data. In the normal flow of things, the client sends some data and the server processes it and then returns to ReadFile() to wait for the next chunk of data.

NamedPipeClientStream can not access to NamedPipeServerStream under session 0

限于喜欢 提交于 2019-11-29 09:14:29
I have NamedPipeClientStream which connects to NamedPipeServerStream. They exchange a couple of messages, and then NamedPipeClientStream closing, while NamedPipeServerStream recreated and continue listening for the client pipes. (I couldn't make a working async Server Pipe, so this is some kind of dog-nail) The client-server interaction works fine during my client's streams launched from normal user sessions. But there are a situation when Client pipe is launched from session 0 on Win7 and win2008 server. When this happens I had an error in Client stream: "Access to the path is denied" What is

How to capture output of execvp

折月煮酒 提交于 2019-11-29 08:08:18
I'm developing a program which executes a program using execvp. It needs to capture the results of the child process and parse them in the main process. It seems there is a way, using named pipes, and duping. I'm trying to hunt down a good example of this, but so far no luck. If anyone has any pointers, links and/or suggestions about this, I'd greatly appreciate it. You don't need named pipes; unnamed pipes work just fine. Actually, often you can just use popen instead of doing the pipe / fork / dup / exec yourself. popen works like this (though your libc 's implementation likely has more

Minimum OS Permissions required to create named pipe (WCF)

我的未来我决定 提交于 2019-11-29 06:51:24
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? I've tried running as a user with fairly minimal permissions (i.e. just in the local Users group), and this works fine - but I'm concerned that when I deploy to the clients site, the users may be limited in some way that means the named pipe creation doesn't work. No special permissions are required for a locally logged on user to set up the service

Is it possible to change the size of a named pipe on Linux?

被刻印的时光 ゝ 提交于 2019-11-29 03:53:37
I know that for the current version of the Linux kernel, the size of named pipes is 64K. Is it possible to increase this size at all? I know I can switch to sockets, but first I'd like to see if I can solve an intermittent buffer-overflow problem by just increasing the named-pipe size. With recent kernels (>= 2.6.35), you can change the size of a pipe with fcntl(fd, F_SETPIPE_SZ, size) where size is a long . The maximum size is in /proc/sys/fs/pipe-max-size . 来源: https://stackoverflow.com/questions/4739348/is-it-possible-to-change-the-size-of-a-named-pipe-on-linux