diff options
| author | Stefan Monnier | 2010-08-11 07:42:48 +0200 |
|---|---|---|
| committer | Stefan Monnier | 2010-08-11 07:42:48 +0200 |
| commit | c566235d981eba73c88bbff00b6a1d88360b6e9f (patch) | |
| tree | f8d653add3570fe750a83d1123ed35022e0bf4ef /src/callproc.c | |
| parent | 0bfdb86f425a88fe43ebc88851c6f9a6418e1862 (diff) | |
| parent | 490b89acab3e759426ede25c31c94268df55e925 (diff) | |
| download | emacs-c566235d981eba73c88bbff00b6a1d88360b6e9f.tar.gz emacs-c566235d981eba73c88bbff00b6a1d88360b6e9f.zip | |
Merge from trunk
Diffstat (limited to 'src/callproc.c')
| -rw-r--r-- | src/callproc.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/callproc.c b/src/callproc.c index 4286ab1ae29..ca9ff93a6d9 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -102,8 +102,6 @@ Lisp_Object Vconfigure_info_directory, Vshared_game_score_directory; | |||
| 102 | /* Pattern used by call-process-region to make temp files. */ | 102 | /* Pattern used by call-process-region to make temp files. */ |
| 103 | static Lisp_Object Vtemp_file_name_pattern; | 103 | static Lisp_Object Vtemp_file_name_pattern; |
| 104 | 104 | ||
| 105 | extern Lisp_Object Vtemporary_file_directory; | ||
| 106 | |||
| 107 | Lisp_Object Vshell_file_name; | 105 | Lisp_Object Vshell_file_name; |
| 108 | 106 | ||
| 109 | Lisp_Object Vprocess_environment, Vinitial_environment; | 107 | Lisp_Object Vprocess_environment, Vinitial_environment; |
| @@ -984,7 +982,9 @@ usage: (call-process-region START END PROGRAM &optional DELETE BUFFER DISPLAY &r | |||
| 984 | RETURN_UNGCPRO (unbind_to (count, Fcall_process (nargs, args))); | 982 | RETURN_UNGCPRO (unbind_to (count, Fcall_process (nargs, args))); |
| 985 | } | 983 | } |
| 986 | 984 | ||
| 985 | #ifndef WINDOWSNT | ||
| 987 | static int relocate_fd (int fd, int minfd); | 986 | static int relocate_fd (int fd, int minfd); |
| 987 | #endif | ||
| 988 | 988 | ||
| 989 | static char ** | 989 | static char ** |
| 990 | add_env (char **env, char **new_env, char *string) | 990 | add_env (char **env, char **new_env, char *string) |
| @@ -1113,7 +1113,7 @@ child_setup (int in, int out, int err, register char **new_argv, int set_pgrp, L | |||
| 1113 | char **p, **q; | 1113 | char **p, **q; |
| 1114 | register int new_length; | 1114 | register int new_length; |
| 1115 | Lisp_Object display = Qnil; | 1115 | Lisp_Object display = Qnil; |
| 1116 | 1116 | ||
| 1117 | new_length = 0; | 1117 | new_length = 0; |
| 1118 | 1118 | ||
| 1119 | for (tem = Vprocess_environment; | 1119 | for (tem = Vprocess_environment; |
| @@ -1149,7 +1149,7 @@ child_setup (int in, int out, int err, register char **new_argv, int set_pgrp, L | |||
| 1149 | but with corrected value. */ | 1149 | but with corrected value. */ |
| 1150 | if (egetenv ("PWD")) | 1150 | if (egetenv ("PWD")) |
| 1151 | *new_env++ = pwd_var; | 1151 | *new_env++ = pwd_var; |
| 1152 | 1152 | ||
| 1153 | if (STRINGP (display)) | 1153 | if (STRINGP (display)) |
| 1154 | { | 1154 | { |
| 1155 | int vlen = strlen ("DISPLAY=") + strlen (SDATA (display)) + 1; | 1155 | int vlen = strlen ("DISPLAY=") + strlen (SDATA (display)) + 1; |
| @@ -1179,7 +1179,7 @@ child_setup (int in, int out, int err, register char **new_argv, int set_pgrp, L | |||
| 1179 | } | 1179 | } |
| 1180 | } | 1180 | } |
| 1181 | 1181 | ||
| 1182 | 1182 | ||
| 1183 | #ifdef WINDOWSNT | 1183 | #ifdef WINDOWSNT |
| 1184 | prepare_standard_handles (in, out, err, handles); | 1184 | prepare_standard_handles (in, out, err, handles); |
| 1185 | set_process_dir (SDATA (current_dir)); | 1185 | set_process_dir (SDATA (current_dir)); |
| @@ -1265,6 +1265,7 @@ child_setup (int in, int out, int err, register char **new_argv, int set_pgrp, L | |||
| 1265 | #endif /* not MSDOS */ | 1265 | #endif /* not MSDOS */ |
| 1266 | } | 1266 | } |
| 1267 | 1267 | ||
| 1268 | #ifndef WINDOWSNT | ||
| 1268 | /* Move the file descriptor FD so that its number is not less than MINFD. | 1269 | /* Move the file descriptor FD so that its number is not less than MINFD. |
| 1269 | If the file descriptor is moved at all, the original is freed. */ | 1270 | If the file descriptor is moved at all, the original is freed. */ |
| 1270 | static int | 1271 | static int |
| @@ -1298,6 +1299,7 @@ relocate_fd (int fd, int minfd) | |||
| 1298 | return new; | 1299 | return new; |
| 1299 | } | 1300 | } |
| 1300 | } | 1301 | } |
| 1302 | #endif /* not WINDOWSNT */ | ||
| 1301 | 1303 | ||
| 1302 | static int | 1304 | static int |
| 1303 | getenv_internal_1 (const char *var, int varlen, char **value, int *valuelen, | 1305 | getenv_internal_1 (const char *var, int varlen, char **value, int *valuelen, |
| @@ -1526,13 +1528,12 @@ void | |||
| 1526 | set_initial_environment (void) | 1528 | set_initial_environment (void) |
| 1527 | { | 1529 | { |
| 1528 | register char **envp; | 1530 | register char **envp; |
| 1529 | #ifndef CANNOT_DUMP | 1531 | #ifdef CANNOT_DUMP |
| 1530 | if (initialized) | 1532 | Vprocess_environment = Qnil; |
| 1531 | { | ||
| 1532 | #else | 1533 | #else |
| 1533 | { | 1534 | if (initialized) |
| 1534 | Vprocess_environment = Qnil; | ||
| 1535 | #endif | 1535 | #endif |
| 1536 | { | ||
| 1536 | for (envp = environ; *envp; envp++) | 1537 | for (envp = environ; *envp; envp++) |
| 1537 | Vprocess_environment = Fcons (build_string (*envp), | 1538 | Vprocess_environment = Fcons (build_string (*envp), |
| 1538 | Vprocess_environment); | 1539 | Vprocess_environment); |