diff options
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/mac.c | 7 |
2 files changed, 13 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 287959462be..25b994e3ab8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2008-01-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 2 | |||
| 3 | * mac.c (mac_emacs_pid) [MAC_OSX]: New variable. | ||
| 4 | [MAC_OSX] (init_mac_osx_environment): Initialize it. | ||
| 5 | [MAC_OSX] (mac_try_close_socket) [SELECT_USE_CFSOCKET]: Return 0 | ||
| 6 | when used on child processes. | ||
| 7 | |||
| 1 | 2008-01-10 Chong Yidong <cyd@stupidchicken.com> | 8 | 2008-01-10 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 9 | ||
| 3 | * process.c (wait_reading_process_output): Check for window | 10 | * process.c (wait_reading_process_output): Check for window |
| @@ -5013,6 +5013,9 @@ extern int noninteractive; | |||
| 5013 | sys_select. */ | 5013 | sys_select. */ |
| 5014 | static CFMutableDictionaryRef cfsockets_for_select; | 5014 | static CFMutableDictionaryRef cfsockets_for_select; |
| 5015 | 5015 | ||
| 5016 | /* Process ID of Emacs. */ | ||
| 5017 | static pid_t mac_emacs_pid; | ||
| 5018 | |||
| 5016 | static void | 5019 | static void |
| 5017 | socket_callback (s, type, address, data, info) | 5020 | socket_callback (s, type, address, data, info) |
| 5018 | CFSocketRef s; | 5021 | CFSocketRef s; |
| @@ -5092,7 +5095,7 @@ mac_try_close_socket (fd) | |||
| 5092 | int fd; | 5095 | int fd; |
| 5093 | { | 5096 | { |
| 5094 | #if SELECT_USE_CFSOCKET | 5097 | #if SELECT_USE_CFSOCKET |
| 5095 | if (cfsockets_for_select) | 5098 | if (getpid () == mac_emacs_pid && cfsockets_for_select) |
| 5096 | { | 5099 | { |
| 5097 | void *key = (void *) fd; | 5100 | void *key = (void *) fd; |
| 5098 | CFSocketRef socket = | 5101 | CFSocketRef socket = |
| @@ -5329,6 +5332,8 @@ init_mac_osx_environment () | |||
| 5329 | char *p, *q; | 5332 | char *p, *q; |
| 5330 | struct stat st; | 5333 | struct stat st; |
| 5331 | 5334 | ||
| 5335 | mac_emacs_pid = getpid (); | ||
| 5336 | |||
| 5332 | /* Initialize locale related variables. */ | 5337 | /* Initialize locale related variables. */ |
| 5333 | mac_system_script_code = | 5338 | mac_system_script_code = |
| 5334 | (ScriptCode) GetScriptManagerVariable (smSysScript); | 5339 | (ScriptCode) GetScriptManagerVariable (smSysScript); |