ipc

Low-level shared memory on iOS

时光总嘲笑我的痴心妄想 提交于 2019-12-19 10:21:57
问题 I'm trying to construct a block of shared memory on iOS. It compiles and links, but shmget() throws a SIGSYS signal on the most innocent parameters: NSString *p = [[NSBundle mainBundle] pathForResource:@"crash" ofType: nil]; key_t tok = ftok([p UTF8String], 918273); int mid = shmget(tok, 4096, IPC_CREAT|S_IRUSR|S_IWUSR); tok is a large positive integer, not -1. Size - tried 1024, same effect. Is SysV shared memory even supported on iOS? The headers and the libraries are present, or compiler

way to implement IPC

你离开我真会死。 提交于 2019-12-19 10:08:04
问题 what is the preferred way to implement IPC over windows ? i know of several like : named pipe, shared memory, semaphors ? , maybe COM (though i'm not sure how)... i wanted to know what's considered the most robust,fast,least error prone and easy to maintain/understand. 回答1: Take a look at boost::interprocess. Shared memory is probably the fastest in general, but somewhat error-prone and limited to local processes. COM is fully versioned and automatically supports remote IPC, but obviously it

Inter-process communication between languages/operating systems

元气小坏坏 提交于 2019-12-19 08:54:03
问题 I am looking for an inter-process communication facility that can be used between languages and/or environments running on the same or different systems. For instance it should allow signals to be sent between Java, C# and/or C++ components, and it should also support some kind of queueing mechanism. The only facility that is obviously environment and language-independent is files, but I assume this would be much too slow - and disciplined queueing may be difficult to implement. Many of the

Login method Customization using GINA

 ̄綄美尐妖づ 提交于 2019-12-19 05:08:14
问题 I know it's not easy to find a master in GINA, but my question is most near to Interprocess Communication(IPC), I wrote my custom GINA in unmanaged c++, I included it a method that checks for validity of a fingerprint for the user try to login, this function will call some method in a running system windows service written in c#, the code follows: in GINA, unmanaged c++ if(Fingerprint.Validate(userName,finerprintTemplate) { //perform login } in windows service, C# public class Fingerprint {

Interoperate between C# and Java using web services without a Java EE application server?

徘徊边缘 提交于 2019-12-19 04:12:37
问题 I'm in a difficult position: We have a 3rd party enterprise system that exposes a Java-based API. However, we are a 100% .Net oriented development team. Essentially, I need to wrap the Java API with something that C# code can call. Web services would be great, but the only Java application server supported on our infrastructure is WebSphere 6.1. This means the ancient (and deprecated) JAX-RPC web service framework is the only way for us to expose web services. Just getting a simple proof-of

How to work with named pipes (C++ server , C# client)

匆匆过客 提交于 2019-12-19 04:06:11
问题 I am trying to get started with working with named pipes as I will need to use them for a project of mine in the future. At the moment I have a C++ server which waits until a client connects and sends over a test message. I roughly followed this tutorial to get started. The relevant code is below: #define MESSAGE L"TestMessage" HANDLE hnamedPipe = INVALID_HANDLE_VALUE; hnamedPipe = CreateNamedPipe( L"\\\\.\\pipe\\testpipe", PIPE_ACCESS_DUPLEX, PIPE_TYPE_MESSAGE| PIPE_READMODE_MESSAGE| PIPE

Waiting on multiple semaphores without busy-waiting (C/C++ Linux)

百般思念 提交于 2019-12-19 03:18:11
问题 If I have more than one semaphore, how can I have a process block until at least one of the semaphores is free? I know I can do this with a busy-wait loop such as: // blocks until one of the semaphores in sems is free, returns // index of semaphore that was available int multiple_sem_wait(sem_t **sems, int num_sems) { while (true) { for (int i = 0; i < num_sems; ++i) { if (sem_trywait(sems[i]) == 0) { return i; } } } } But is there a way to do this without a busy-loop? Perhaps there's some

Interprocess communication on windows

痞子三分冷 提交于 2019-12-18 17:29:08
问题 I have a TCL script running on windows. I need to communicate to a old vc++ 6 app running in a different process. I need to have 2 way communication. In Linux I would use dbus, but what IPC strategy should I use for windows? 回答1: Tcl on windows has dde support built-in (see docs for the dde command) which could help if the other application supports this. Another option is the TWAPI (Tcl Windows API) extension, which has facilities for sending keyboard and mouse input to another application,

Configuring SELinux permissions on (SVS-V) IPC Semaphores

时光怂恿深爱的人放手 提交于 2019-12-18 14:54:41
问题 I have a bunch of programs which use IPC Semaphores to interact (semget). One of the programs is an Apache module, which runs in (some sort of) restricted SELinux context (which I don't understand too well). The module is capable of interacting with any regular files correctly, if of-course the files have their SELinux security context set appropriately. However - when my (Module) goes to access the IPC Semaphore, the semget call fails with a EPERM. When SELinux is turned off, I don't get

How to wait till data is written on the other end of pipe

随声附和 提交于 2019-12-18 12:45:27
问题 I am developing an application in C. Parent and child process communicate through pipe. Before writing to pipe, parent process execute another statements. In sample code, i have used sleep(10) to make delay. In the child process, it should read the data from the pipe. But data is not read on the read end of pipe in child process. int main() { int pid; FILE *fp; fp = fopen("test.txt","w"); char *buff; int fd[2]; int count = 0 ; pipe(fd); pid = fork(); if(pid == 0) { close(fd[1]); ioctl(fd[0],