Think about Loose Coupling | |
PerlMonks |
Running gpg thru IPC, fileno problemby zentara (Archbishop) |
on Jun 09, 2005 at 14:30 UTC ( [id://465144]=perlquestion: print w/replies, xml ) | Need Help?? |
zentara has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
Someone asked on the perl.beginners maillist, a question about running gpg thru a script. Well I thought It could be run thru IPC::Open3, but there is a complication. Gpg grabs the tty
of the perlscript, preventing IPC from operating. If you run the script below(modified to edit a suitable name for your system), gpg, grabs the tty. If you enter "trust" followed by Enter, a new menu appears. That is the functionality I'm trying to perform thru the script. If I print to the IN filehandle, it does nothing. I've noticed that the Crypt::GPG module uses IPC::Run and an undocumented gpg option called "--no-tty", but that aside, I just want to know how to access the STDIN to gpg. On my system gpg is shown using /dev/pts/5, and I can't seem to be able to print to it. Is it possible thru some sort of fileno magic?
I'm not really a human, but I play one on earth. flash japh
Back to
Seekers of Perl Wisdom
|
|