X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Wed, 20 Oct 2010 00:42:56 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: Sending signals to a subprocess Message-ID: <20101020044256.GC3382@ednor.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <4CB9DE15 DOT 8010308 AT cornell DOT edu> <4CB9E9C0 DOT 3000509 AT cornell DOT edu> <20101018183438 DOT GA25878 AT ednor DOT casa DOT cgf DOT cx> <4CBCA2A5 DOT 4010601 AT cornell DOT edu> <20101018201805 DOT GA26254 AT ednor DOT casa DOT cgf DOT cx> <4CBD9DF2 DOT 3090804 AT cornell DOT edu> <20101019141557 DOT GA31784 AT ednor DOT casa DOT cgf DOT cx> <4CBE5F53 DOT 30402 AT cornell DOT edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4CBE5F53.30402@cornell.edu> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 On Tue, Oct 19, 2010 at 11:17:39PM -0400, Ken Brown wrote: >On 10/19/2010 10:15 AM, Christopher Faylor wrote: >I would like to create a STC that would let me investigate this further, >but I don't know enough programming to do it. It ought to be completely >trivial. Here's what happens: > >Emacs creates a subprocess that runs an interactive bash shell. Emacs >wants to get the PGID of the foreground process group associated to the >tty of this shell, and it does this on Linux via TIOCGPGRP (or equally >well tcgetpgrp). I think it uses the file descriptor of the master of >the pty for this purpose. If you (or some other programmer reading >this) could give me the code for setting all this up, I could play with >it and try to figure out why I'm seeing a difference between Linux and >Cygwin here. I just don't know how to create a subprocess, give it a >terminal, etc. I provided a simple text case here: http://cygwin.com/ml/cygwin/2010-10/msg00395.html 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