|
From: | Jan Djärv |
Subject: | Re: Redirecting standard output |
Date: | Sun, 24 Apr 2011 10:30:57 +0200 |
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 |
Eli Zaretskii skrev 2011-04-23 22.10:
From: Lars Magne Ingebrigtsen<address@hidden> Date: Sat, 23 Apr 2011 20:46:36 +0200Or 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.
[Prev in Thread] | Current Thread | [Next in Thread] |