ipc

Unable to do AF_UNIX socket IPC in Android using NDK: Operation not permitted

瘦欲@ 提交于 2019-12-11 03:49:24
问题 I am attempting to use unix-domain sockets and am developing under the NDK. I am routinely receiving Operation not permitted errors for various actions related to trivial AF_UNIX / SOCK_DGRAM type IPC. I am able to successfully bind both processes to a particular interface but am unable to either connect or send / sendto without getting the error mentioned above. The bound interfaces do appear on the file system if an appropriate ls is done in the specified directory. Also, each interface

RPC Authentication

大憨熊 提交于 2019-12-11 03:14:29
问题 I'm working on communicating data on local machine using Remote Procedure Calls ( RPC ). My requirement is use RPC to communicate data between two processed, but server should authenticate client by some means. I came across RpcBindingSetAuthInfo which set authentication and authorization information. The fourth parameter is authentication service which can be anything from http://msdn.microsoft.com/en-us/library/windows/desktop/aa373556(v=vs.85).aspx WINNT authentication is not applicable in

Python - OSError 24 (Too many open files) and shared memory

ぃ、小莉子 提交于 2019-12-11 03:13:52
问题 I faced with the problem there was exception OSError 24 ("Too many open files") raised on my mac os x in python script. I had no idea what could caused that issue. lsof -p showed about 40-50 lines, and my ulimit was 1200 (I check that using resource.getrlimit(resource.RLIMIT_NOFILE) ), that returned tuple (1200, 1200). So I didn't exceed limit even closely. That my script spawned number of subprocesses and also allocated shared memory segments. Exception occurred while allocating shared

Communication between workers in uwsgi

旧城冷巷雨未停 提交于 2019-12-11 03:10:09
问题 I'm relatively new to Python, coming from a .Net background. The short version: How can I create an application-wide singleton or some other mechanism to allow multiple threads/processes to communicate with each other? Maybe I'm spoilt but in .Net, I'd just create something in App_Start or something else at the "application level". How can I do the same in python/uwsgi? The long version: We've got a restful API written using Django. Some of the calls require some pre-processing and then

C++ application notify C# application

◇◆丶佛笑我妖孽 提交于 2019-12-11 03:08:44
问题 I'm currently having a C++ app and a C# app, I want my C++ app notify C# app that something is happended (like events), what I'm doing now is using shared memory like: C++: CreateFileMappingW(L"MySharedMemory"); C#: MemoryMappedFile.OpenExisting("MySharedMemory") so C++ app write a flag in shared memory then C# app read this flag and know something is happened, but it is a bad idea because C# app have to keep checking the flag, so is there a better idea? 回答1: Ok, sorry if it's a bit messy or

yarn hadoop 2.4.0: info message: ipc.Client Retrying connect to server

送分小仙女□ 提交于 2019-12-11 02:52:32
问题 i've searched for two days for a solution. but nothing worked. First, i'm new to the whole hadoop/yarn/hdfs topic and want to configure a small cluster. the message above doesn't show up everytime i run an example from the mapreduce-examples.jar sometimes teragen works, sometimes not. in some cases the whole job failed, in others the job finishes successfully. sometimes the job failes, without printing the message above. 14/06/08 15:42:46 INFO ipc.Client: Retrying connect to server: FQDN

How can one app provide data to another without swiching apps?

三世轮回 提交于 2019-12-11 02:14:58
问题 Scenario: I "control" two different apps, App A and App B, both which the user has installed App A is running App A needs to obtain a string that was set by App B when App B last ran. After obtaining the string, App A will still be running User should not receive any feedback this communication is happening. E.g. no "switching animations" between A or B, no pop-ups, etc. Constraints: Apps are released under different vendors Apps are already in the app store; updated versions will have this

EXC_BAD_INSTRUCTION when sending message to XPC Service

余生长醉 提交于 2019-12-11 00:42:57
问题 I'm trying to use an XPC Service for inter-process communication. I've added an XPC service target to my project, and then when I try doing a xpc_connection_send_message I get EXC_BAD_INSTRUCTION . As far as I can tell, I am correctly initializing and starting the connection. serviceConnection = xpc_connection_create("com.foo.bar.MyService", dispatch_get_main_queue()); xpc_connection_set_event_handler(serviceConnection, ^(xpc_object_t event) { xpc_type_t type = xpc_get_type(event); if (type =

How do I terminate a thread that is waiting for a semaphore operation

 ̄綄美尐妖づ 提交于 2019-12-10 22:43:08
问题 I am writing a program that uses shared memory and semaphores for ipc. There is one main server process that creates the shared memory and semaphores. Any number of client processes can attach to the shared memory and read and write to it when allowed. The semaphores provide the blocking mechanism to control reads and writes. Everything works fine except when a I try to terminate a client. The semaphore block to access the shared memory is in a thread and on process termination I have no way

Interprocess communication on the same box - communication between 2 applications or processes

情到浓时终转凉″ 提交于 2019-12-10 17:49:29
问题 What is the best way to implement interprocess communication between applications that are on the same box -- both written in c#? The manager application will be sending commands such as: stop, start to the other applications. It will also be monitoring the applications and possibly asking for data. All applications will be on the same machine running on windows 7 OS. Is IPC Channel a good choice for this? Is named Pipes a better choice? Or is sockets a better choice? The applications that