1.7.1: terminal not passing Ctrl-C to sub-sub cygwin processes
From within cygwin python, if I call os.system running a cygwin sub-process, and I hit Ctrl-C while that cygwin sub-process is running, the Ctrl-C does nothing (absolutely nothing -- nothing is printed, nothing terminates, no sound is made -- it's as if I didn't press the key at all). I've attached a simple script which easily reproduces the situation. When I run the script as ./ctrlc.py 0, Ctrl-C kill the process, but when I run it with an argument of 1 or more, hitting Ctrl-C has no effect. I have not testing this with anything other than python, but I have a feeling that it's not python related. Cygwin Configuration Diagnostics Current System Time: Fri Jan 15 10:16:37 2010 Windows XP Professional Ver 5.1 Build 2600 Service Pack 3 Running in Terminal Service session Path: C:\cygwin\usr\local\bin C:\cygwin\bin C:\cygwin\bin C:\Program Files\Microsoft Office\OFFICE11\ C:\WINDOWS\system32 C:\WINDOWS C:\WINDOWS\System32\Wbem C:\Program Files\Microsoft SQL Server\90\Tools\binn\ C:\Program Files\Common Files\GTK\2.0\bin C:\Program Files\GNU\GnuPG\pub C:\Program Files\QNX Software Systems\bin C:\WINDOWS\system32\WindowsPowerShell\v1.0 F:\QNX641\host\win32\x86\usr\bin Output from C:\cygwin\bin\id.exe UID: 13689(rcampbell)GID: 10513(Domain Users) 0(root) 544(Administrators) 545(Users) 1008(Debugger Users) 10513(Domain Users) SysDir: C:\WINDOWS\system32 WinDir: C:\WINDOWS MAKEFLAGS = '-IF:/QNX641/target/qnx6/usr/include' USER = 'rcampbell' PWD = '/home/rcampbell' HOME = '/home/rcampbell' HOMEPATH = '\Documents and Settings\rcampbell' MANPATH = '/usr/local/man:/usr/share/man:/usr/man::/usr/ssl/man' APPDATA = 'C:\Documents and Settings\rcampbell\Application Data' SSH_AGENT_PID = '3028' HOSTNAME = 'rcampbell' VS71COMNTOOLS = 'C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools\' QNX_CONFIGURATION = 'C:\Program Files\QNX Software Systems' TERM = 'xterm' PROCESSOR_IDENTIFIER = 'x86 Family 6 Model 15 Stepping 11, GenuineIntel' WINDIR = 'C:\WINDOWS' QNX_JAVAHOME = 'F:\QNX641\_jvm' OLDPWD = '/usr/bin' USERDOMAIN = 'DRAGONWAVE' OS = 'Windows_NT' ALLUSERSPROFILE = 'C:\Documents and Settings\All Users' !:: = '::\' TEMP = '/tmp' COMMONPROGRAMFILES = 'C:\Program Files\Common Files' LIB = 'C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Lib\' SSH_AUTH_SOCK = '/tmp/ssh-IwBSPf3500/agent.3500' USERNAME = 'rcampbell' PROCESSOR_LEVEL = '6' PSModulePath = 'C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\' FP_NO_HOST_CHECK = 'NO' SYSTEMDRIVE = 'C:' LANG = 'C.UTF-8' USERPROFILE = 'C:\Documents and Settings\rcampbell' PS1 = '\[\e]0;\w\a\]\n\[\e[32m\...@\h \[\e[33m\]\w\[\e[0m\]\n\$ ' LOGONSERVER = '\\CLAPTON' PROCESSOR_ARCHITECTURE = 'x86' VISUALSVN_SERVER = 'C:\Program Files\VisualSVN Server\' SHLVL = '1' QNX_TARGET = 'F:/QNX641/target/qnx6' USERDNSDOMAIN = 'DRAGONWAVEINC.COM' PATHEXT = '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.PSC1' HOMEDRIVE = 'C:' QNX_HOST = 'F:/QNX641/host/win32/x86' COMSPEC = 'C:\WINDOWS\system32\cmd.exe' TMP = '/tmp' SYSTEMROOT = 'C:\WINDOWS' PRINTER = 'Fleury on kermit (from DWI-A2535)' CVS_RSH = '/bin/ssh' PROCESSOR_REVISION = '0f0b' HUDSON_HOME = 'F:/.hudson' INFOPATH = '/usr/local/info:/usr/share/info:/usr/info:' PROGRAMFILES = 'C:\Program Files' NUMBER_OF_PROCESSORS = '2' INCLUDE = 'C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\include\' COMPUTERNAME = 'RCAMPBELL' _ = '/usr/bin/cygcheck' HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2 HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2 c__altera_72sp1_quartus_bin_cygwin_bin_cygwin1_dll HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options HKEY_CURRENT_USER\Software\Cygwin HKEY_CURRENT_USER\Software\Cygwin\Program Options HKEY_CURRENT_USER\Software\Cygwin\setup HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Start Menu2\Programs\Cygwin (default) = (unsupported type) HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Start Menu2\Programs\Cygwin-X (default) = (unsupported type) HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2 (default) = '/cygdrive' cygdrive flags = 0x0022 HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/ (default) = 'C:\cygwin' flags = 0x000a HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/c (default) = 'C:' flags = 0x000a HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/f (default) = 'F:' flags = 0x000a HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/mp3 (default) = 'F:\mp3' flags = 0x000a HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/share (default) = 'C:\cygwin\home\rcampbell\share' flags = 0x000a
Re: 1.7.1: terminal not passing Ctrl-C to sub-sub cygwin processes
On Fri, Jan 15, 2010 at 05:00:37PM -0500, Rolf Campbell wrote: From within cygwin python, if I call os.system running a cygwin sub-process, and I hit Ctrl-C while that cygwin sub-process is running, the Ctrl-C does nothing (absolutely nothing -- nothing is printed, nothing terminates, no sound is made -- it's as if I didn't press the key at all). I've attached a simple script which easily reproduces the situation. When I run the script as ./ctrlc.py 0, Ctrl-C kill the process, but when I run it with an argument of 1 or more, hitting Ctrl-C has no effect. I have not testing this with anything other than python, but I have a feeling that it's not python related. It probably isn't. From the linux man page: NAME system - execute a shell command SYNOPSIS #include stdlib.h int system(const char *command); DESCRIPTION system() executes a command specified in command by calling /bin/sh -c command, and returns after the command has been completed. During execution of the command, SIGCHLD will be blocked, and SIGINT and SIGQUIT will be ignored. cgf -- 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
Re: 1.7.1: terminal not passing Ctrl-C to sub-sub cygwin processes
On 2010-01-15 18:22, Christopher Faylor wrote: On Fri, Jan 15, 2010 at 05:00:37PM -0500, Rolf Campbell wrote: From within cygwin python, if I call os.system running a cygwin sub-process, and I hit Ctrl-C while that cygwin sub-process is running, the Ctrl-C does nothing (absolutely nothing -- nothing is printed, nothing terminates, no sound is made -- it's as if I didn't press the key at all). [snip] It probably isn't. From the linux man page: NAME system - execute a shell command SYNOPSIS #includestdlib.h int system(const char *command); DESCRIPTION system() executes a command specified in command by calling /bin/sh -c command, and returns after the command has been completed. During execution of the command, SIGCHLD will be blocked, and SIGINT and SIGQUIT will be ignored. cgf Thanks for setting me straight. When I change my script to use os.popen, ^C gets propagated to sub-processes. -- 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