From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: W32 version crashes on C-g Date: Sun, 19 Mar 2006 02:32:04 +0100 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1142732042 12271 80.91.229.2 (19 Mar 2006 01:34:02 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 19 Mar 2006 01:34:02 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 19 02:34:01 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FKmns-0004b7-PO for ged-emacs-devel@m.gmane.org; Sun, 19 Mar 2006 02:33:57 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FKmns-0008Fs-25 for ged-emacs-devel@m.gmane.org; Sat, 18 Mar 2006 20:33:56 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FKmnd-0008Fa-2e for emacs-devel@gnu.org; Sat, 18 Mar 2006 20:33:41 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FKmnb-0008FG-SI for emacs-devel@gnu.org; Sat, 18 Mar 2006 20:33:40 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FKmnb-0008F8-Oj for emacs-devel@gnu.org; Sat, 18 Mar 2006 20:33:39 -0500 Original-Received: from [195.41.46.237] (helo=pfepc.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FKmsp-0001Ag-GQ for emacs-devel@gnu.org; Sat, 18 Mar 2006 20:39:03 -0500 Original-Received: from kfs-l.imdomain.dk.cua.dk (0x503e2644.bynxx3.adsl-dhcp.tele.dk [80.62.38.68]) by pfepc.post.tele.dk (Postfix) with SMTP id 28A6826280A; Sun, 19 Mar 2006 02:33:38 +0100 (CET) Original-To: "Juanma Barranquero" In-Reply-To: (Juanma Barranquero's message of "Sat, 18 Mar 2006 07:00:03 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:51838 Archived-At: "Juanma Barranquero" writes: > BTW, if you have extra free time ;-) you could take a look at the > "100% CPU on socket select" problem... :-) Here is what I have done so far ... Somebody more familiar with W32 programming should take over from here! [from admin/FOR-RELEASE] ** TCP server processes do not work on Windows. TCP/IP server processes created with `make-network-process' consume excesive CPU on some Windows environments. Usages of 50% and 100% CPU time have been observed on different Window XP configurations. Seems to be a problem in sys_select in w32proc.c. In its current form, it sys_select says the socket is ready, so we call server_accept_connection which again calls accept() which returns -1 with errno == WSAEWOULDBLOCK (10035) indicating that there is no pending connection to accept. It seems that to fix this, w32 server sockets must use WSAAsyncSelect + FD_ACCEPT to request notifications of incoming connections... -- Kim F. Storm http://www.cua.dk