Commit Graph

12 Commits

Author SHA1 Message Date
Ryan Prichard
bde8922e08 Fix a C++11 issue: separate string literals and macros with a space. 2015-10-13 04:32:51 -05:00
Ryan Prichard
e19c29bd03 Avoid setting lpDesktop if there we didn't actually create a new desktop.
* Add debug information.

 * This change fixed a bug where the new winpty-agent.exe process
   successfully started, but immediately exited without reaching main().
   The bug occurred while SSH'ing into the Cygwin SSH server.
2015-09-29 02:32:57 -05:00
Ryan Prichard
6e696f8828 Allow winpty to function with a visible console.
* If a new window station can't be created, keep going anyway.  I *think*
   this is what IntelliJ's fork is doing.  Perhaps the window should be
   marked SW_HIDE in this case?

 * Rename WINPYDBG to WINPTY_DEBUG.

 * Add an environment variable WINPTY_SHOW_CONSOLE.  If non-empty, the
   console window is placed on the same window station and is visible.
   It's intended for testing purposes.
2015-08-23 23:13:20 -05:00
Ryan Prichard
ce9f480e5c Remove trailing whitespace. 2014-09-17 14:55:28 -07:00
Ryan Prichard
d0e8764666 Work around what I think is a typo in a MinGW header.
Address the Cygwin part of GitHub issue 27.
2014-09-17 14:55:19 -07:00
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
a7bc8fcf9d Rename Shared to shared and Misc to misc. 2012-04-01 02:13:21 -07:00
Ryan Prichard
9f26d1fc1e Remove a TODO comment for a completed task. 2012-04-01 01:42:50 -07:00
Ryan Prichard
023d6c71f9 Realign indentation in a couple places. 2012-04-01 01:40:15 -07:00
Ryan Prichard
80d005e33e Start the agent's child process on the libwinpty client's desktop.
If I run a GUI program inside mintty using winpty, the GUI's window should
appear on the same desktop as mintty, not on the hidden desktop containing
the winpty console.

Even though STARTUPINFO.lpDesktop's type is LPTSTR (instead of LPCTSTR),
the documentation doesn't say anything about CreateProcess modifying the
lpDesktop string, so I didn't bother making a copy of desktop.c_str().
2012-03-31 00:55:49 -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