[RFA] patch for run.exe -- ATTN: ago

Charles Wilson cygwin@cwilson.fastmail.fm
Thu May 18 06:45:00 GMT 2006


As detailed here:
http://cygwin.com/ml/cygwin/2006-05/msg00471.html

run.exe currently launches clients without any stdio handles and without 
any console at all.  That's over-ambitious: what run REALLY should do is 
launch the client with a *hidden* console and *working* stdio handles.

Run is a console-hider, not a daemonizer -- and some apps (like, err, 
rxvt-unicode), even tho they are GUIs, don't behave well when launched 
without working stdio (even if those handles point to an invisible 
console, and really shouldn't be used by the app anyway!)

The attached patch adapts code from cygwin's fhandler_init, using 
NT/2K/XP-only APIs to enable AllocConsole() to initialize the stdio 
handles *without* that console ever becoming visible, not even for a 
brief flash.  Because these APIs are only available on some of the 
supported OSes, I use LoadLibrary/GetProcAddress and function pointers, 
so that on the older OSes the behavior should be unchanged from 1.1.9-1.

With this patch, rxvt-unicode-X is happy and no longer sucks 100% CPU 
when launched by run.exe with loginShell=true, as is the case with 
run-1.1.9-1.  (At least, on NT/2K/XP.  On 95/98/Me, I expect 
rxvt-unicode-X will be just as unhappy with this patch as without.  Half 
  loaves and baby steps...)

--
Chuck
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: run-allocate-invisible-console.patch2
URL: <http://cygwin.com/pipermail/cygwin/attachments/20060518/fc3d8db6/attachment.ksh>
-------------- next part --------------
--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


More information about the Cygwin mailing list