[Mono-devel-list] System.Diagnostic.Process and /dev/tty
Miguel de Icaza
miguel at ximian.com
Tue Jun 14 21:33:08 EDT 2005
> I'm attempting to write a simple interface between C# and the GNU
> Privacy Guard, but I'm running into a problem. Namely, whenever I set
> processObject.RedirectStandardInput to true, GnuPG will die screaming
> because it can't access /dev/tty.
> Obviously, the best bet would be to tell GnuPG that it's being
> redirected and thus not to have a conniption. I asked about this on
> GnuPG-devel some time ago and received no answer. I'm hoping that
> there'll be a workaround somewhere in C# which will allow me to fool
> GnuPG into thinking it's got a tty.
This is a common Unix question.
The only way of doing this is to create a pseudo-terminal, but this is
highly unportable code and is very hard to get right.
You might want to look at zvt, part of the old gnome-libs which contains
all the C magic to do this.
More information about the Mono-devel-list