mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-28 07:50:48 -08:00
(mac_emacs_pid) [MAC_OSX]: New variable.
[MAC_OSX] (init_mac_osx_environment): Initialize it. [MAC_OSX] (mac_try_close_socket) [SELECT_USE_CFSOCKET]: Return 0 when used on child processes.
This commit is contained in:
parent
d31dcb1196
commit
5ee4de5319
2 changed files with 13 additions and 1 deletions
|
|
@ -5013,6 +5013,9 @@ extern int noninteractive;
|
|||
sys_select. */
|
||||
static CFMutableDictionaryRef cfsockets_for_select;
|
||||
|
||||
/* Process ID of Emacs. */
|
||||
static pid_t mac_emacs_pid;
|
||||
|
||||
static void
|
||||
socket_callback (s, type, address, data, info)
|
||||
CFSocketRef s;
|
||||
|
|
@ -5092,7 +5095,7 @@ mac_try_close_socket (fd)
|
|||
int fd;
|
||||
{
|
||||
#if SELECT_USE_CFSOCKET
|
||||
if (cfsockets_for_select)
|
||||
if (getpid () == mac_emacs_pid && cfsockets_for_select)
|
||||
{
|
||||
void *key = (void *) fd;
|
||||
CFSocketRef socket =
|
||||
|
|
@ -5329,6 +5332,8 @@ init_mac_osx_environment ()
|
|||
char *p, *q;
|
||||
struct stat st;
|
||||
|
||||
mac_emacs_pid = getpid ();
|
||||
|
||||
/* Initialize locale related variables. */
|
||||
mac_system_script_code =
|
||||
(ScriptCode) GetScriptManagerVariable (smSysScript);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue