From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Jan_Dj=E4rv?= Newsgroups: gmane.emacs.devel Subject: Re: Redirecting standard output Date: Sun, 24 Apr 2011 10:30:57 +0200 Message-ID: <4DB3DFC1.7040303@swipnet.se> References: <83oc402ky4.fsf@gnu.org> <8362q73dap.fsf@gnu.org> <876FF1E0-A9BB-4804-845C-46947AC085EE@swipnet.se> <4DB08348.3040208@lanl.gov> <83ei4sbuf3.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1303633887 18505 80.91.229.12 (24 Apr 2011 08:31:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 24 Apr 2011 08:31:27 +0000 (UTC) Cc: Lars Magne Ingebrigtsen , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Apr 24 10:31:23 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QDuiw-0006vX-Mw for ged-emacs-devel@m.gmane.org; Sun, 24 Apr 2011 10:31:22 +0200 Original-Received: from localhost ([::1]:58456 helo=lists2.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QDuiu-0005l4-Vq for ged-emacs-devel@m.gmane.org; Sun, 24 Apr 2011 04:31:20 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:49322) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QDuim-0005ju-OX for emacs-devel@gnu.org; Sun, 24 Apr 2011 04:31:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QDuii-00065m-Bi for emacs-devel@gnu.org; Sun, 24 Apr 2011 04:31:12 -0400 Original-Received: from smtprelay-h22.telenor.se ([195.54.99.197]:46799) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QDuid-00064x-52; Sun, 24 Apr 2011 04:31:03 -0400 Original-Received: from ipb4.telenor.se (ipb4.telenor.se [195.54.127.167]) by smtprelay-h22.telenor.se (Postfix) with ESMTP id CF681EA863; Sun, 24 Apr 2011 10:30:58 +0200 (CEST) X-SENDER-IP: [85.225.45.100] X-LISTENER: [smtp.bredband.net] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhNMAHXes01V4S1kPGdsb2JhbACJGJxKCwEBAQE3MsBIhXYEkj0 X-IronPort-AV: E=Sophos;i="4.64,262,1301868000"; d="scan'208";a="1723975546" Original-Received: from c-642de155.25-1-64736c10.cust.bredbandsbolaget.se (HELO coolsville.localdomain) ([85.225.45.100]) by ipb4.telenor.se with ESMTP; 24 Apr 2011 10:30:58 +0200 Original-Received: from [172.20.199.13] (zeplin [172.20.199.13]) by coolsville.localdomain (Postfix) with ESMTPSA id D333A7FA05A; Sun, 24 Apr 2011 10:30:57 +0200 (CEST) User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; sv-SE; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 In-Reply-To: <83ei4sbuf3.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 195.54.99.197 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:138678 Archived-At: Eli Zaretskii skrev 2011-04-23 22.10: >> From: Lars Magne Ingebrigtsen >> Date: Sat, 23 Apr 2011 20:46:36 +0200 >> >>>> Or are there gotchas when using select in Emacs? >>> >>> wait_reading_process_output already uses select, so adding another one >>> is probably not a good idea. >> >> Would `select'-ing on two separate collections of sockets cause any >> problems? > > I don't know. I never tried, and I don't know enough about the > implementation of `select'. But I envision difficulties in > multiplexing between the two `select' calls, if, e.g., there's an > async subprocess running (like a speller in some text buffer) and you > invoke a program via call-process. Since call-process normally doesn't return until the process is finished, that will not differ from what we have now. As for selecting in two places, this is already done, for example when you open a new network socket, when a menu is opened on X, and when waiting for resize events on X. You just put in the pipe end of stdin and stderr into the select and loop on that. Jan D.