opening pipe to process already running
Eugene Tsyrklevich
eugene at securityarchitects.com
Fri Jun 9 18:00:51 CDT 2000
~sdpm~
On Fri, Jun 09, 2000 at 11:20:46AM -0700, John R. Comeau wrote:
> ~sdpm~
> I'm running on SunOS5.5.1, and I'd like to be able to open a pipe to a
> process that's already running. That is, suppose I have a 'daemon'
> process that runs all the time. Then periodically another process
> will run and communicate with the daemon process over a Unix pipe. I
> don't even know if this is possible in Unix; all the Perl examples
> I've seen deal with pipes between parent and child processes.
> However, in my case the processes do not have a parent-child
> relationship.
> What I currently have implemented is that the daemon process looks for
> special files created by the periodic processes. However, this is
> messy since those files may be left over if one of the processes is
> killed before it can delete them.
>
> I know that you can send a signal to a running process, but how do you
> open a pipe to it?
>
> I guess another possibility is that I could use a FIFO file (named
> pipe) instead of the normal files I currently have implemented. But
> still that seems messy.
if your processes are unrelated than you have to use FIFOs for your pipes IPC
see http://www.perl.com/pub/doc/manual/html/pod/perlipc.html for more details
my personal favorite is sockets.. another alternative (which is probably the messiest) is shared memory
cheers,
Eugene Tsyrklevich
Security Architects, Inc.
~sdpm~
The posting address is: san-diego-pm-list at hfb.pm.org
List requests should be sent to: majordomo at hfb.pm.org
If you ever want to remove yourself from this mailing list,
you can send mail to <majordomo at happyfunball.pm.org> with the following
command in the body of your email message:
unsubscribe san-diego-pm-list
If you ever need to get in contact with the owner of the list,
(if you have trouble unsubscribing, or have questions about the
list itself) send email to <owner-san-diego-pm-list at happyfunball.pm.org> .
This is the general rule for most mailing lists when you need
to contact a human.
More information about the San-Diego-pm
mailing list