Commit Graph

13 Commits

Author SHA1 Message Date
Uwe Stieber
c170d6167f Add support for a non-terminal console mode
If a process is running under control of winpty, the output of the process is decorated with ESC sequences to control a terminal to print the process output nicely. In some environments however, the client showing the output to the user is not a full terminal emulation, the Eclipse CDT debug console view in example, and the ESC sequences are printed as output additional to the real process output. This commit is adding an API function to switch into a mode where winpty is not decorating the process output with ESC sequences. The console mode is designated to pass on the process output to the client as is.
2013-12-06 15:32:23 +01:00
Uwe Stieber
03fbed5fc2 Add API to access the process id of the started process
Added new agent message "GetProcessId" and a API "winpty_get_process_id"
to allow access to the process id of the started process. The process id
is needed to integrate "winpty" with Eclipse CDT to launch native Windows
console applications inside the Eclipse UI.
2013-09-24 10:09:01 +02:00
Ryan Prichard
023d6c71f9 Realign indentation in a couple places. 2012-04-01 01:40:15 -07:00
Ryan Prichard
71aa4a59bb Rename pconsole to winpty.
* This avoids a name conflict with an existing unrelated project.

 * I think winpty is a better name anyway.  (i) It's more obviously
   Windows-related.  (ii) I think it more accurately describes what it
   does.  A "pseudo-console" ought to mirror the console API and allow
   replacing the implementation built-in to Windows.  This project is only
   trying to provide functionality similar to using the master interface of
   a Unix pty, but for native console programs.
2012-03-25 02:29:37 -07:00
Ryan Prichard
22f96abc03 Add comments to the pconsole.h header file. 2012-03-24 17:17:23 -07:00
Ryan Prichard
44554d5e9d Add an MIT copyright notice to all the source files. 2012-03-23 03:11:34 -07:00
Ryan Prichard
00eee82468 Add TODO comments. 2012-03-13 22:15:02 -07:00
Ryan Prichard
90164c34a9 Get the agent + libpconsole + unix-adapter trio working.
- Update the Agent to use separate control and data pipes and to receive
   arbitrary-sized packets.  Handle child process creation in the agent.

 - Fix bugs in libpconsole:
    - Insert a space between the pipe names on the agent command line.
    - Don't close the desktop and window station until after connecting
      to the agent's pipes.

 - Change the format of the pconsole_start_process env parameter from an
   array of wide-character-string pointers to a single contiguous block of
   memory, like that accepted by CreateProcess.
2012-02-20 01:23:46 -08:00
Ryan Prichard
27f0c4d156 Get pconsole.exe and pconsole.dll building simultaneously.
* Remove obsolete comments and APIs.

 * In pconsole.exe, use two threads to handle pconsole<->pty communication.
   I use blocking I/O for the pty.  For the Win32 pipe to the pconsole
   agent, I use overlapped I/O and emulate blocking I/O.

   I'm not sure I *have* to open the pipe in overlapped mode.  When I last
   tried using non-overlapped I/O, I had a problem where a pending read
   would block writes (or vice versa).  Maybe setting the overlapped
   parameter to {Read,Write}File would be sufficient.
2012-02-16 03:49:17 -08:00
Ryan Prichard
40c7e87528 Checkpoint work on libpconsole. 2012-02-10 02:09:38 -08:00
Ryan Prichard
1aaf102905 Get libpconsole.dll building again with stubbed out functions. 2012-01-27 10:08:21 -08:00
Ryan Prichard
c0918b6db4 Update pconsole.h with a new non-blocking pconsole API.
This API is not implemented yet, so the code no longer builds after this
commit.
2012-01-27 09:05:34 -08:00
Ryan Prichard
a4df196ed4 Work on switching from qmake to makefiles and reorganize code a little.
My plan now is to integrate the PseudoConsole with Cygwin and MSYS ptys,
with initial focus on Cygwin.  I think I'll keep the separate Agent and DLL
binaries, and they'll continue to be native Win32 binaries.  I don't want
to have two build systems (qmake vs whatever MSYS/Cygwin uses), and since
I'd like to remove the Qt dependency anyway, I'm trying to switch to
makefiles.
2012-01-21 17:30:41 -08:00