From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Leake Newsgroups: gmane.emacs.devel Subject: process_send_string blocks? Date: Sat, 06 Sep 2014 03:09:22 -0500 Message-ID: <85y4txdvbh.fsf@stephe-leake.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1409991014 2242 80.91.229.3 (6 Sep 2014 08:10:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 6 Sep 2014 08:10:14 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Sep 06 10:10:07 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XQB4R-0003oi-6z for ged-emacs-devel@m.gmane.org; Sat, 06 Sep 2014 10:10:07 +0200 Original-Received: from localhost ([::1]:33723 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XQB4Q-0007kY-Lc for ged-emacs-devel@m.gmane.org; Sat, 06 Sep 2014 04:10:06 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36674) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XQB45-0007Xz-2V for emacs-devel@gnu.org; Sat, 06 Sep 2014 04:09:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XQB3x-0003pF-Jt for emacs-devel@gnu.org; Sat, 06 Sep 2014 04:09:45 -0400 Original-Received: from dnvrco-outbound-snat.email.rr.com ([107.14.73.230]:60208 helo=dnvrco-oedge-vip.email.rr.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XQB3x-0003iD-ER for emacs-devel@gnu.org; Sat, 06 Sep 2014 04:09:37 -0400 Original-Received: from [70.94.38.149] ([70.94.38.149:49430] helo=TAKVER) by dnvrco-oedge01 (envelope-from ) (ecelerity 3.5.0.35861 r(Momo-dev:tip)) with ESMTP id 45/93-18326-D31CA045; Sat, 06 Sep 2014 08:09:34 +0000 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (windows-nt) X-RR-Connecting-IP: 107.14.64.118:25 X-Authority-Analysis: v=2.1 cv=btPCBSqi c=1 sm=1 tr=0 a=AppmJ/7ZOOFWL/q6u6u93g==:117 a=AppmJ/7ZOOFWL/q6u6u93g==:17 a=ayC55rCoAAAA:8 a=9XSUBuVRJI8A:10 a=bgdNFZx-hFAA:10 a=f4bzfoJql18A:10 a=o_R75loqY_IA:10 a=9i_RQKNPAAAA:8 a=RC9jVkk_6NHw8u7dAfYA:9 X-Cloudmark-Score: 0 X-detected-operating-system: by eggs.gnu.org: BaiduSpider X-Received-From: 107.14.73.230 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:174052 Archived-At: I'm trying to use a background process to parse buffer text, and send results back to Emacs. For large buffers, Emacs hangs; only killing the background process externally recovers. This does not happen for small buffers (< 5k bytes?). It appears that process-send-string is blocked on a full IO send queue, while the background process is also blocked on a full IO send queue. On reading process.c, I believe this should not happen, if the OS supports EWOULDBLOCK. Is that true, even when there is only one call to process-send-string that sends the entire buffer? The doc string for process-send-string says "if > 500 chars, string is sent in bunches", but I see no evidence of that in process.c. Is that refering to the OS IO queue buffer size? I'm running on Windows 7, using the Windows binary emacs-23.4-bin-i386.zip from the FSF FTP site. Is EWOULDBLOCK supported on this system? I'll try compiling Emacs from source so I can run the debugger; I've never tried that on Windows before. I'd hate to have to code the partial read/partial write logic at the elisp level. -- -- Stephe