aboutsummaryrefslogtreecommitdiffstats
path: root/src/w32proc.c
diff options
context:
space:
mode:
authorStefan Monnier2012-03-25 16:37:21 -0400
committerStefan Monnier2012-03-25 16:37:21 -0400
commit699c782b7668c44d0fa4446331b0590a6d5dac82 (patch)
tree5dcce364741d0761920a3d274b0fc8aba4103d45 /src/w32proc.c
parent98fb480ee31bf74cf554044f60f21df16566dd7f (diff)
parente99a9b8bdccadded1f6fae88ee7a2a93dfd4eacf (diff)
downloademacs-pending.tar.gz
emacs-pending.zip
Merge from trunkpending
Diffstat (limited to 'src/w32proc.c')
-rw-r--r--src/w32proc.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/w32proc.c b/src/w32proc.c
index 47cbf57d9ea..28591f90128 100644
--- a/src/w32proc.c
+++ b/src/w32proc.c
@@ -1,5 +1,5 @@
1/* Process support for GNU Emacs on the Microsoft W32 API. 1/* Process support for GNU Emacs on the Microsoft W32 API.
2 Copyright (C) 1992, 1995, 1999-2011 Free Software Foundation, Inc. 2 Copyright (C) 1992, 1995, 1999-2012 Free Software Foundation, Inc.
3 3
4This file is part of GNU Emacs. 4This file is part of GNU Emacs.
5 5
@@ -122,12 +122,12 @@ new_child (void)
122 122
123 for (cp = child_procs + (child_proc_count-1); cp >= child_procs; cp--) 123 for (cp = child_procs + (child_proc_count-1); cp >= child_procs; cp--)
124 if (!CHILD_ACTIVE (cp)) 124 if (!CHILD_ACTIVE (cp))
125 goto Initialise; 125 goto Initialize;
126 if (child_proc_count == MAX_CHILDREN) 126 if (child_proc_count == MAX_CHILDREN)
127 return NULL; 127 return NULL;
128 cp = &child_procs[child_proc_count++]; 128 cp = &child_procs[child_proc_count++];
129 129
130 Initialise: 130 Initialize:
131 memset (cp, 0, sizeof (*cp)); 131 memset (cp, 0, sizeof (*cp));
132 cp->fd = -1; 132 cp->fd = -1;
133 cp->pid = -1; 133 cp->pid = -1;
@@ -174,7 +174,7 @@ delete_child (child_process *cp)
174 cp->status = STATUS_READ_ERROR; 174 cp->status = STATUS_READ_ERROR;
175 SetEvent (cp->char_consumed); 175 SetEvent (cp->char_consumed);
176#if 0 176#if 0
177 /* We used to forceably terminate the thread here, but it 177 /* We used to forcibly terminate the thread here, but it
178 is normally unnecessary, and in abnormal cases, the worst that 178 is normally unnecessary, and in abnormal cases, the worst that
179 will happen is we have an extra idle thread hanging around 179 will happen is we have an extra idle thread hanging around
180 waiting for the zombie process. */ 180 waiting for the zombie process. */
@@ -241,7 +241,8 @@ reader_thread (void *arg)
241 241
242 /* We have to wait for the go-ahead before we can start */ 242 /* We have to wait for the go-ahead before we can start */
243 if (cp == NULL 243 if (cp == NULL
244 || WaitForSingleObject (cp->char_consumed, INFINITE) != WAIT_OBJECT_0) 244 || WaitForSingleObject (cp->char_consumed, INFINITE) != WAIT_OBJECT_0
245 || cp->fd < 0)
245 return 1; 246 return 1;
246 247
247 for (;;) 248 for (;;)
@@ -820,7 +821,7 @@ sys_spawnve (int mode, char *cmdname, char **argv, char **envp)
820 821
821 The w32 GNU-based library from Cygnus doubles quotes to escape 822 The w32 GNU-based library from Cygnus doubles quotes to escape
822 them, while MSVC uses backslash for escaping. (Actually the MSVC 823 them, while MSVC uses backslash for escaping. (Actually the MSVC
823 startup code does attempt to recognise doubled quotes and accept 824 startup code does attempt to recognize doubled quotes and accept
824 them, but gets it wrong and ends up requiring three quotes to get a 825 them, but gets it wrong and ends up requiring three quotes to get a
825 single embedded quote!) So by default we decide whether to use 826 single embedded quote!) So by default we decide whether to use
826 quote or backslash as the escape character based on whether the 827 quote or backslash as the escape character based on whether the
@@ -2066,8 +2067,8 @@ DEFUN ("w32-get-console-codepage", Fw32_get_console_codepage,
2066 2067
2067DEFUN ("w32-set-console-codepage", Fw32_set_console_codepage, 2068DEFUN ("w32-set-console-codepage", Fw32_set_console_codepage,
2068 Sw32_set_console_codepage, 1, 1, 0, 2069 Sw32_set_console_codepage, 1, 1, 0,
2069 doc: /* Make Windows codepage CP be the current codepage setting for Emacs. 2070 doc: /* Make Windows codepage CP be the codepage for Emacs tty keyboard input.
2070The codepage setting affects keyboard input and display in tty mode. 2071This codepage setting affects keyboard input in tty mode.
2071If successful, the new CP is returned, otherwise nil. */) 2072If successful, the new CP is returned, otherwise nil. */)
2072 (Lisp_Object cp) 2073 (Lisp_Object cp)
2073{ 2074{
@@ -2094,8 +2095,8 @@ DEFUN ("w32-get-console-output-codepage", Fw32_get_console_output_codepage,
2094 2095
2095DEFUN ("w32-set-console-output-codepage", Fw32_set_console_output_codepage, 2096DEFUN ("w32-set-console-output-codepage", Fw32_set_console_output_codepage,
2096 Sw32_set_console_output_codepage, 1, 1, 0, 2097 Sw32_set_console_output_codepage, 1, 1, 0,
2097 doc: /* Make Windows codepage CP be the current codepage setting for Emacs. 2098 doc: /* Make Windows codepage CP be the codepage for Emacs console output.
2098The codepage setting affects keyboard input and display in tty mode. 2099This codepage setting affects display in tty mode.
2099If successful, the new CP is returned, otherwise nil. */) 2100If successful, the new CP is returned, otherwise nil. */)
2100 (Lisp_Object cp) 2101 (Lisp_Object cp)
2101{ 2102{
@@ -2113,7 +2114,7 @@ If successful, the new CP is returned, otherwise nil. */)
2113 2114
2114DEFUN ("w32-get-codepage-charset", Fw32_get_codepage_charset, 2115DEFUN ("w32-get-codepage-charset", Fw32_get_codepage_charset,
2115 Sw32_get_codepage_charset, 1, 1, 0, 2116 Sw32_get_codepage_charset, 1, 1, 0,
2116 doc: /* Return charset of codepage CP. 2117 doc: /* Return charset ID corresponding to codepage CP.
2117Returns nil if the codepage is not valid. */) 2118Returns nil if the codepage is not valid. */)
2118 (Lisp_Object cp) 2119 (Lisp_Object cp)
2119{ 2120{
@@ -2295,7 +2296,7 @@ filesystems via ange-ftp. */);
2295 doc: /* Non-nil means attempt to fake realistic inode values. 2296 doc: /* Non-nil means attempt to fake realistic inode values.
2296This works by hashing the truename of files, and should detect 2297This works by hashing the truename of files, and should detect
2297aliasing between long and short (8.3 DOS) names, but can have 2298aliasing between long and short (8.3 DOS) names, but can have
2298false positives because of hash collisions. Note that determing 2299false positives because of hash collisions. Note that determining
2299the truename of a file can be slow. */); 2300the truename of a file can be slow. */);
2300 Vw32_generate_fake_inodes = Qnil; 2301 Vw32_generate_fake_inodes = Qnil;
2301#endif 2302#endif
@@ -2319,4 +2320,3 @@ where the performance impact may be noticeable even on modern hardware. */);
2319 staticpro (&Vw32_valid_codepages); 2320 staticpro (&Vw32_valid_codepages);
2320} 2321}
2321/* end of w32proc.c */ 2322/* end of w32proc.c */
2322