From: dhruva <dhruvakm@gmail.com>
To: "Jason Rumney" <jasonr@gnu.org>
Cc: Glenn Morris <rgm@gnu.org>, rms@gnu.org, emacs-devel@gnu.org
Subject: Re: [andrew.maguire@ge.com: Emacs 22.1 hung after delete-process]
Date: Thu, 16 Aug 2007 19:39:11 +0530 [thread overview]
Message-ID: <e3f230850708160709w673f9196t5262cc6bdb3cb22c@mail.gmail.com> (raw)
In-Reply-To: <e3f230850708160542p3a304325qb336767516c9fd15@mail.gmail.com>
Hi,
I have put it a fix that seems to solve this problem (observed on my
box). I find the issue in using SetEvent() and not waiting long enough
before calling TerminateThread(). Either we could remove the call the
TerminateThread() or increase the delay (that I have done) or ideally
use a critical section (add it in the child_process structure).
-dky
E:\cache\build\emacs\src
[dky]hg cdiff w32proc.c
*** emacs.58583440b48b\src\w32proc.c 2007-08-16 19:11:29.218750000 +0530
--- E:\cache\build\emacs\src\w32proc.c 2007-08-16 19:02:44.828125000 +0530
*************** delete_child (child_process *cp)
*** 216,222 ****
/* let the thread exit cleanly if possible */
cp->status = STATUS_READ_ERROR;
SetEvent (cp->char_consumed);
! if (WaitForSingleObject (cp->thrd, 1000) != WAIT_OBJECT_0)
{
DebPrint (("delete_child.WaitForSingleObject (thread) failed "
"with %lu for fd %ld\n", GetLastError (), cp->fd));
--- 216,222 ----
/* let the thread exit cleanly if possible */
cp->status = STATUS_READ_ERROR;
SetEvent (cp->char_consumed);
! if (WaitForSingleObject (cp->thrd, INFINITE) != WAIT_OBJECT_0)
{
DebPrint (("delete_child.WaitForSingleObject (thread) failed "
"with %lu for fd %ld\n", GetLastError (), cp->fd));
--
Dhruva Krishnamurthy
Contents reflect my personal views only!
next prev parent reply other threads:[~2007-08-16 14:09 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-15 18:21 [andrew.maguire@ge.com: Emacs 22.1 hung after delete-process] Richard Stallman
2007-08-16 3:24 ` Glenn Morris
2007-08-16 4:46 ` dhruva
2007-08-17 0:32 ` Richard Stallman
2007-08-16 8:02 ` Jason Rumney
2007-08-16 12:42 ` dhruva
2007-08-16 14:09 ` dhruva [this message]
2007-08-16 17:04 ` dhruva
2007-08-16 19:41 ` Eli Zaretskii
2007-08-17 0:32 ` Richard Stallman
2007-08-17 5:27 ` dhruva
2007-08-27 10:07 ` dhruva
2007-09-02 17:02 ` Jason Rumney
2007-08-17 13:43 ` Jason Rumney
2007-08-17 17:31 ` dhruva
2007-08-17 20:40 ` Jason Rumney
2007-08-19 7:42 ` dhruva
2007-08-22 6:29 ` dhruva
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e3f230850708160709w673f9196t5262cc6bdb3cb22c@mail.gmail.com \
--to=dhruvakm@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=jasonr@gnu.org \
--cc=rgm@gnu.org \
--cc=rms@gnu.org \
/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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).