This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: rxvt loses output connection with non cygwin console processes

I can reproduce this, although I did not try rolling back my Cygwin version.

The issue seems specific to .NET programs because they always do null
writes.  However the following straight Win32 program written in C will also
reproduce the problem (basically the same program I've sent earlier on this
mailing list).  So it is not specific to .NET.

#include <windows.h>
int main() {
	char * test = "Hello world!\n";
	DWORD written;
	WriteFile(h, test, 0, &written, NULL); /* causes problems */
	WriteFile(h, test, lstrlenA(test), &written, NULL);
	return 0;

As the OP notes, I also only have this problem when running the test program
from a "GUI" terminal.  It seems that any program doing a null write to
standard output (and probably standard error?) will trigger the problem.

>From Windows command prompt / standard Windows console window:  Running
Cygwin.bat to start Cygwin and then running ./Test.exe works fine.

>From mintty.exe:  Running ./Test.exe causes bash to hang.  Test.exe runs to
completion and terminates, but bash doesn't get the hint.  CPU usage is at
0%.  If I use Windows Task Manager to kill bash.exe, then mintty.exe
correctly terminates. 

>From rxvt.exe:  Running ./Test.exe causes bash to hang like with mintty.
Test.exe runs to completion and terminates but bash is hung.  For some
reason, a thread in rxvt spins in an infinite loop, sucking 100% of a single
CPU core.  The hung bash.exe doesn't use any CPU.  If I use Windows Task
Manager to kill bash.exe, then rxvt.exe correctly exits its loop and

> i have discovered something peculiar.
> I run my rxvt with the usual:
> C:\cygwin\bin\rxvt.exe -bg wheat -fg black -sl 5000 -e /bin/bash -ls
> now I try inside to run some *non* cygwin console program rxvt shows
> nothing, and reports 30% cpu consumption
> The actual program is executed, completes and control comes back to bash,
> but the output is not there.
> I can issue blindly other commands and see them in process list (e.g. ls
-lR /) I
> can also terminate the session with Ctrl-D or exit As long as rxvt is
> procexplorer reports 30% cpu usage.
> This started to happen today after I did update (setup.exe) The cygwin.dll
> version is 1.7.15-1 Now if I roll back cygwin.dll to 1.7.14-2 problem is
> The programs which triggers the problem are .net console applications
> (2.0 or 4.0).
> All cygwin binaries + java.exe work ok.
> The trigger program runs ok in cmd.exe with bash.
> And as a bonus, mintty has also similar problem. Cpu doesn't go as high
> input channel with bash is lost.

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]