Example #1
0
 PseudoTerminal(TerminalOptions ptyOptions,
                ThreadSafeFifoBuffer inputPipe,
                ThreadSafeFifoBuffer outputPipe,
                bool isMaster)
 {
     inputStream  = inputPipe;
     outputStream = outputPipe;
     inputStream.ThrowOnTerminationRequest  = true;
     outputStream.ThrowOnTerminationRequest = false;
     options       = ptyOptions;
     this.isMaster = isMaster;
 }
Example #2
0
        /// <inheritdoc/>
        public static void CreatePair(out PseudoTerminal master, out PseudoTerminal slave, TerminalOptions options)
        {
            var inputStream  = new ThreadSafeFifoBuffer();
            var outputStream = new ThreadSafeFifoBuffer();

            master = new PseudoTerminal(options, inputStream, outputStream, true);
            slave  = new PseudoTerminal(options, inputStream, outputStream, false);
        }