From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19594 invoked by alias); 20 Feb 2004 07:17:07 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 19585 invoked from network); 20 Feb 2004 07:17:07 -0000 Received: from unknown (HELO jive.SoftHome.net) (66.54.152.27) by sources.redhat.com with SMTP; 20 Feb 2004 07:17:07 -0000 Received: (qmail 4507 invoked by uid 417); 20 Feb 2004 07:17:06 -0000 Received: from mambo-.softhome.net (HELO softhome.net) (172.16.2.15) by shunt-smtp-out-0 with SMTP; 20 Feb 2004 07:17:06 -0000 Received: from localhost (localhost [127.0.0.1]) (uid 417) by softhome.net with local; Fri, 20 Feb 2004 00:17:04 -0700 From: borota@softhome.net To: cygwin@cygwin.com Subject: main thread of a process Date: Fri, 20 Feb 2004 07:51:00 -0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Sender: borota@softhome.net X-Originating-IP: [65.42.95.1] Message-ID: X-SW-Source: 2004-02/txt/msg01035.txt.bz2 I want to send messages to the main thread of a Win process created with 'spawn'. Is there a way to do that in 'pure Cygwin'? The Windows sequence would be: CreateProcess(NULL, cmd, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); ... PostThreadMessage(pi.dwThreadId, WM_QUIT, 0, 0); //or whatever ... 'spawn' returns the 'pid' of the new process. Is that always equal to pi.dwProcessId? Is there a way to get from this 'pid' to sending messages to the main thread? Is there a place where pi.dwThreadId is saved? (global structure, etc.) Thanks, Greg -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/