Aug 21, 2008, 10:32 AM
Post #1 of 1
using $SIG as an IPC interrupt?
I have a scenario where I am communicating between a program written in C and a program written in Perl. The C program passes messages to the Perl program.
Right now the C program writes to a file and the Perl program polls every 200ms.
Instead, I would like to have the C program somehow "interrupt" the Perl program to tell it to read the file.
Can you suggest an appropriate mechanism for this? I'm a little concerned about using $SIG since it seems to me this is more for handling system events rather than specific messaging.
I'm also not sure if opening up a named pipe is appropriate since I dont want to block either program, and forking off child processes is not ideal either.
Any advice would be greatly appreciated.