Dominik Werder wrote: > Hello! > > I tried to use the command line gnu privacy guard with ruby. > > The first attempt works quite good, using the Open3 lib: > > i,o,e=Open3.popen3 "gpg --batch -ea" > i.puts ciphertext > i.close > o.each do |s| > puts "Out: " << s > end > e.each do |s| > puts "Err: " << s > end > o.close > e.close > > > But if I want language independant error codes then I have to pass gpg > some file descriptor numbers like: > gpg --no-tty --command-fd 14 --status-fd 15 --logger-fd 16 > > > My question is: How do I create such pipes? Not sure about this either. Maybe it would work if you fork the process, then open some files and use their #fileno as value, and then use exec to replace the running process with the gpg program. But that's pure speculation... Regards, Michael