ipc

how to send a message from one windows console application to another?

我只是一个虾纸丫 提交于 2019-12-04 23:43:25
问题 I have a windows console application which starts child process. How can I send a message to child process? I found functions like PostMessage()/PeekMessage() - that's what I need, but as I understand, it is used inside one application, and uses HWND to identify the target window (I have no windows in application). Also I've read materials about ipc, for example named pipes demand HWND too. I want something like that: [program 1] int main() { CreateProcess(.., processInfo); SendMessage

Sharing Mach ports with child processes

眉间皱痕 提交于 2019-12-04 21:41:41
问题 I am doing a comparison of different IPC mechanisms available on Mac OS X (pipes, sockets, System V IPC, etc.), and I would like to see how Mach ports compare to the higher-level alternatives. However, I've run into a very basic issue: getting send rights to ports across processes (specifically, across a parent process and a child process). Unlike file descriptors, ports are generally not carried over to forked processes. This means that some other way to transfer them must be established.

记录一下 接入大华ipc摄像机rtsp流的经历

久未见 提交于 2019-12-04 21:16:36
当时接入rtsp服务器时,我测过一些别的厂家的ipc,没有理会rtcp消息。 当对于大华的ipc 不理会rtcp不行啊,你必须建立rtcp的通讯 随便给它发点什么东西都可以,然后流就接通上来了。 不知道我这是不是个例,仅作为我这次经历的记录 来源: CSDN 作者: zhouxj0818 链接: https://blog.csdn.net/zhouxj0818/article/details/80452284

command to check status of message queue and shared memory in linux?

筅森魡賤 提交于 2019-12-04 21:10:46
问题 Sorry to ask such a silly question as i am noob in unix. what are the unix commands to find shared memory and message queue and how to kill them ? 回答1: ipcs(1) provides information on the IPC facilities and ipcrm(1) can be used to remove the IPC objects from the system. List shared memory segments: ipcs -m List message queues: ipcs -q Remove shared memory segment created with shmkey : ipcrm -M key Remove shared memory segment identified by shmid : ipcrm -m id Remove message queue created with

Java Posix IPC Is there an API? [closed]

家住魔仙堡 提交于 2019-12-04 19:42:52
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . I'm wondering if I can access to a Posix Message Queue in Java as I have an application that can't be modified and uses a message queue to talk to other processes. Is there any api or package that do that? I know that I can use JNI but I need to do this ASAP so no time to develop that. Regards. 回答1: A bit of

Python 2.6: Process local storage while using multiprocessing.Pool

假如想象 提交于 2019-12-04 19:28:26
I'm attempting to build a python script that has a pool of worker processes (using mutiprocessing.Pool) across a large set of data. I want each process to have a unique object that gets used across multiple executes of that process. Psudo code: def work(data): #connection should be unique per process connection.put(data) print 'work done with connection:', connection if __name__ == '__main__': pPool = Pool() # pool of 4 processes datas = [1..1000] for process in pPool: #this is the part i'm asking about // how do I really do this? process.connection = Connection(conargs) for data in datas:

**Non-Boost** STL allocator for shared memory

我的未来我决定 提交于 2019-12-04 18:09:19
问题 Due to policy where I work, I am unable to use a version of Boost newer than 1.33.1 and unable to use a version of GCC newer than 4.1.2. Yes, it's garbage, but there is nothing I can do about it. Boost 1.33.1 does not contain the interprocess library. That said, one of my projects requires placing an std::map (or more likely an std::unordered_map ) in to shared memory. It is only written/modified ONE TIME when the process loads by a single process (the "server") and read by numerous other

How to filter a lot of data with IPC::Open2?

你说的曾经没有我的故事 提交于 2019-12-04 18:06:41
My task is to filter some data from perl script with external utility (the addr2line). The data size is quite large. I need to print a lot of data to stdin of program and read a lot of data back (from stdout of program into my script). Now I do this with IPC::Open2 , but I don't mix reading and writing. Is this legal? Will Open2 buffer any size of data in pipe? My code: my $cmd="addr2line -e $prog_name "; use IPC::Open2; local (*Reader, *Writer); my $pid = open2(\*Reader, \*Writer, $cmd); for(@requests) { # this array is HUGE, 100s of thousands of entries print Writer "$_\n"; } close Writer;

Communication between Windows Universal App and Desktop application (Win 10)

心已入冬 提交于 2019-12-04 17:45:29
Is there any way to realize communication between a Windows Universal App and a standard Desktop application running at the same computer? I read that UAs don't support IPC. Instead they use those so called background agents. But is it possible to use those background agents not to communicate with a UA but rather a desktop application or is this completely suppressed? The reason is, that I already have a desktop application and I would like to add Cortana support to it, without too much effort. So I would like to avoid converting the desktop app to a universal app. Cortana is only available

Can't get ZeroMQ python bindings to receive messages over IPC

荒凉一梦 提交于 2019-12-04 16:36:49
问题 I'm trying to achieve PUB/SUB over IPC. If I changed the code below so that the subscriber binds to "tcp://*:5000" and the publisher connects to "tcp://localhost:5000" it works, but I can't get it to work over IPC. What am I doing wrong? subscriber.py import zmq, json def main(): context = zmq.Context() subscriber = context.socket(zmq.SUB) subscriber.bind("ipc://test") subscriber.setsockopt(zmq.SUBSCRIBE, '') while True: print subscriber.recv() if __name__ == "__main__": main() publisher.py