0
  1. There is a difference between pseudoterminals and pipes in linux. It is possible to detect this, as described in this answer - https://stackoverflow.com/a/1312957/1709408

  2. It is possible to obtain handle of a new pty, as written here - Declarations of p/invoke for file io and pseudo terminal and explained there - http://docs.oracle.com/cd/E19253-01/816-4855/termsub15-14/index.html

  3. It is IMPOSSIBLE to pass the handle to Process.Start, because it always create pipe itself - https://github.com/mono/mono/blob/0806ff5baf5140ccc3525c85ff661313b4c9bcef/mcs/class/System/System.Diagnostics/Process.cs#L1051

So, how to create a new process in mono and pass pty to it ?

Community
  • 1
  • 1
user1709408
  • 528
  • 4
  • 16
  • https://bugzilla.xamarin.com/show_bug.cgi?id=34312 – user1709408 Sep 26 '15 at 03:05
  • it is possible to use http://docs.go-mono.com/monodoc.ashx?link=M:Mono.Unix.Native.Syscall.isatty(System.Int32) to check if stream is tty – user1709408 Sep 26 '15 at 03:38
  • It's impossible to temporary replace MonoIO's handles, they are readonly - https://github.com/mono/mono/blob/2309cc50a933d059e813b74b8d8afaa0b1472e5c/mcs/class/corlib/System.IO/MonoIO.cs#L557-L570 – user1709408 Sep 26 '15 at 04:21

0 Answers0