Mail Archives: cygwin/2009/08/14/14:16:40
--------------090906040905030902030006
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Charles Wilson wrote:
> Corinna Vinschen wrote:
>> Actually, what I told above is nonsense anyway. What I saw was the
>> flickering cmd window from a urxvt-X startup without run. With run it
>> doesn't start at all for me on W7, unless I start it from an existing
>> console window. And in that case it doesn't matter if the
>> CREATE_NO_WINDOW flag is given or not, it always takes 100% CPU. So,
>> scratch that, it's no solution at all.
>
> Rats. So much for a "good enough" workaround.
OK, the attached patch (on top of run-1.1.11) seems to correct the
problem in my testing.
For testing, I:
1) used the W7 "workaround" code, even though I was using Vista.
2) This caused 100% CPU
3) then, adding the attached patch, I tried again (with the W7
"workaround" code still enabled) and did NOT see 100% CPU.
So, I'm hopeful that this fixes the problem for real, on W7. However,
with one exception, the production version of 1.1.12 for <= WinXP will
continue to use the "old" code. That exception is:
for WinXP and above, I forcibly enabled the used "pipes" -- that is,
explicitly creating new Windows Handles and setting them up as the
child's stdio. The reason for this is, even the "old" run code would
hit 100% CPU in the following scenario, on WinXP:
1) from a bash prompt in a cmd window
2) run urxvt-X.exe -display 127.0.0.1:0.0
gave 100% CPU, although launching urxvt-X from a shortcut using the same
invocation did not do so. With this small change, that problem is
corrected, too.
Corinna, can you give this a try? (I'm happy to send you a compiled
version of the modified run.exe if that helps).
--
Chuck
--------------090906040905030902030006
Content-Type: application/x-patch;
name="newfix.patch"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="newfix.patch"
ZGlmZiAtLWdpdCBhL3NyYy9ydW4uYyBiL3NyYy9ydW4uYwppbmRleCAxNzFm
NWQ3Li43MWE2NzhiIDEwMDY0NAotLS0gYS9zcmMvcnVuLmMKKysrIGIvc3Jj
L3J1bi5jCkBAIC0yNzQsNyArMjc0LDcgQEAgQk9PTCBzZXR1cF9pbnZpc2li
bGVfY29uc29sZSgpCiAKIC8qIHJldHVybnMgRkFMU0Ugb25seSBvbiBlcnJv
ciBjb25kaX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IHVzZSB0aGUg
bW9yZSByZWxpYWJsZSBzZXR1cF9pbnZpc2libGVfY29uc29sZSgpIGFuZCBp
dHMKKyAgICAgICAqIHNlcGFyYXRlIFdpbmRvd1N0YXRpb24gYXBwcm9hY2gu
CisgICAgICAgKi8KKyAgICAgIGlmIChvc192ZXJzaW9uID49IDB4MDYwMSkK
ICAgICAgIHsKICAgICAgICAgRnJlZUNvbnNvbGUgKCk7CiAgICAgICAgICgq
QXR0YWNoQ29uc29sZUZQKSAoY2hpbGQuZHdQcm9jZXNzSWQpOwogICAgICAg
ICBTZXRQYXJlbnQgKCgqR2V0Q29uc29sZVdpbmRvd0ZQKSAoKSwgSFdORF9N
RVNTQUdFKTsKICAgICAgIH0KLSNlbmRpZgorCiAgICAgICBDbG9zZUhhbmRs
ZSAoY2hpbGQuaFRocmVhZCk7CiAgICAgICBDbG9zZUhhbmRsZSAoY2hpbGQu
aFByb2Nlc3MpOwogICAgICAgaWYgKGJVc2luZ1BpcGVzKQo=
--------------090906040905030902030006
Content-Type: text/plain; charset=us-ascii
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
--------------090906040905030902030006--
- Raw text -