Intercommunication between Perl and C

H

hn.ft.pris

My problem is like this , I have written a CGI in Perl , which collect
the input of users and use "system" to call a C program to dealing with
the data , then read the output of the C program , at last print to the
screen . The above data all exchanged in files .
It works well except that when there is an invoke the C program would
be called and it loads a big dictionary which costs more than 5 second
, so users have to wait a long time to see the result...
There are suggestions that I should run the C program as a daemon , and
use IPC to exchange data between C and Perl program , but I'm confused
which kind of IPC suits my case , and what I should learn to make it .
 
S

Sherm Pendley

There are suggestions that I should run the C program as a daemon , and
use IPC to exchange data between C and Perl program , but I'm confused
which kind of IPC suits my case , and what I should learn to make it .

"perldoc perlipc" is a good intro to the types of IPC available from Perl.

sherm--
 
J

John Bokma

My problem is like this , I have written a CGI in Perl , which collect
the input of users and use "system" to call a C program to dealing with
the data , then read the output of the C program , at last print to the
screen . The above data all exchanged in files .

let's hope that you lock those files, etc, etc.
It works well except that when there is an invoke the C program would
be called and it loads a big dictionary which costs more than 5 second
,

I am sure that there is room for improvement there, lots maybe.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,176
Messages
2,570,947
Members
47,501
Latest member
Ledmyplace

Latest Threads

Top