Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <184670-220032312162339677@M2W029.mail2web.com> X-Priority: 3 Reply-To: lhall AT rfk DOT com X-Originating-IP: 209.113.174.244 From: "lhall AT pop DOT ma DOT ultranet DOT com" To: cygwin AT tlinx DOT org, cygwin AT cygwin DOT com Subject: RE: Cannot get ^Z to suspend a program Date: Wed, 12 Feb 2003 11:23:39 -0500 MIME-Version: 1.0 Content-type: text/plain; charset=iso-8859-1 X-OriginalArrivalTime: 12 Feb 2003 16:23:39.0668 (UTC) FILETIME=[19FB6540:01C2D2B3] Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id h1CGNoi07099 Job control and signals for Cygwin processes are areas pretty internal to Cygwin. they are also pretty complex. IMO, it's hard to talk much about adding some feature to them without the context of what's already there. If you can put your suggestions in that context, I expect you'll get better feedback. Even if that's not the case, you'll be in a better position to evaluate your own ideas given the current architecture. Just my $.02. Larry Original Message: ----------------- From: linda w \(cyg\) cygwin AT tlinx DOT org Date: Tue, 11 Feb 2003 21:18:05 -0800 To: cygwin AT cygwin DOT com Subject: RE: Cannot get ^Z to suspend a program > Sure, but those programs hook the key(s) in a global fashion, > not just > from individual programs. So, Cygwin could hook the Ctrl+Z key, but > what would it do then, how would it know which process to suspend? > > I'm not sure that cygwin could 'suspend' a non-cygwin process > even if it > wanted to. --- started playing around with this...I note: > cygjob& kill -STOP %1 #works as expected but > winprog& kill -STOP %1 #laughs at my puny attempts to stop it So cygjobs seem to be suspendable but winjobs are already not playing fair! now I try this: > while :; do sleep 3; echo 1;done # control-z ignored Also, though, I note that if I type while the program is running, say "ls", then press control-c, "ls" still executes! Under lnx, I see the 'ls' characters echoed as soon as I type them -- it appears "readline" is running "in foreground" even though I have a "job" (the while loop) running in foreground as well. It's "like" even when a foreground job is running, there is a 2nd, system level process that also runs and processes key presses (allowing processing control-u and control-r, among other, readline functions). It _seems_ like to get similar functionality on cygwin, one might have to have the same -- perhaps a unix-like fork/exec/wait would translate, internally, to a windows "fork/exec/select", where select waits for keyboard input or the child process to end. Then the win-parent process -- still in control, could process line editing and user-job control key presses -- since we know that, at least, cygwin programs are "well behaved" in regards to "respecting" a "kill -STOP", the win-parent "keyboard monitor thread" could use the same means to STOP a child. As for job control of winjobs? Guess that'd be another whole pain in the butt. Though maybe if the running user has 'debug' privs, they could attach the process and suspend it that way? (Dunno) If their could be some way of suspending winjobs, though, then the above 'keyboard thread' method could be used to implement job control. Wha'd'ya think? -linda -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ -------------------------------------------------------------------- mail2web - Check your email from the web at http://mail2web.com/ . -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/