I'm writing a web-based interface script (to sit between the user and some database tools), and at several points I'll be having to use interprocess communication. I'm trying to decide what is both the most optimized AND the most secure way to do this. I was originally thinking
IPC::Open2, but I'm considering
IPC::Run.
Here's what I have:
index.pl <-- interface, sits between the user and the different tools
auth.pl <-- one of the many tools, a script that takes user info (ex: a username & password) and authenticates it against database information
now, i want
index.pl to start an instance of
auth.pl and pipe the user information to it (
not pass it as cmdline arguments), then read the output of
auth.pl after it exits.
would
IPC::Open2 or
IPC::Run be the best solutions for this? or is ther something better suited? (i like the fact that IPC::Run has built-in timeouts). i appreciate advice anyone can give me.
__________
Give a man a match and he'll be warm for an hour. Set him on fire and he'll be warm for the rest of his life.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.