public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: borota@softhome.net
To: cygwin@cygwin.com
Subject: main thread of a process
Date: Fri, 20 Feb 2004 07:51:00 -0000	[thread overview]
Message-ID: <courier.4035B470.00007CDF@softhome.net> (raw)

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/

                 reply	other threads:[~2004-02-20  7:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=courier.4035B470.00007CDF@softhome.net \
    --to=borota@softhome.net \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).