diff options
| author | Kenichi Handa | 2004-04-16 12:51:06 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2004-04-16 12:51:06 +0000 |
| commit | 6b61353c0a0320ee15bb6488149735381fed62ec (patch) | |
| tree | e69adba60e504a5a37beb556ad70084de88a7aab /src/callproc.c | |
| parent | dc6a28319312fe81f7a1015e363174022313f0bd (diff) | |
| download | emacs-6b61353c0a0320ee15bb6488149735381fed62ec.tar.gz emacs-6b61353c0a0320ee15bb6488149735381fed62ec.zip | |
Sync to HEAD
Diffstat (limited to 'src/callproc.c')
| -rw-r--r-- | src/callproc.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/callproc.c b/src/callproc.c index 20b3ee22add..2b610d53a1d 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -123,6 +123,9 @@ int synch_process_alive; | |||
| 123 | /* Nonzero => this is a string explaining death of synchronous subprocess. */ | 123 | /* Nonzero => this is a string explaining death of synchronous subprocess. */ |
| 124 | char *synch_process_death; | 124 | char *synch_process_death; |
| 125 | 125 | ||
| 126 | /* Nonzero => this is the signal number that terminated the subprocess. */ | ||
| 127 | int synch_process_termsig; | ||
| 128 | |||
| 126 | /* If synch_process_death is zero, | 129 | /* If synch_process_death is zero, |
| 127 | this is exit code of synchronous subprocess. */ | 130 | this is exit code of synchronous subprocess. */ |
| 128 | int synch_process_retcode; | 131 | int synch_process_retcode; |
| @@ -502,6 +505,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 502 | to avoid timing error if process terminates soon. */ | 505 | to avoid timing error if process terminates soon. */ |
| 503 | synch_process_death = 0; | 506 | synch_process_death = 0; |
| 504 | synch_process_retcode = 0; | 507 | synch_process_retcode = 0; |
| 508 | synch_process_termsig = 0; | ||
| 505 | 509 | ||
| 506 | if (NILP (error_file)) | 510 | if (NILP (error_file)) |
| 507 | fd_error = emacs_open (NULL_DEVICE, O_WRONLY, 0); | 511 | fd_error = emacs_open (NULL_DEVICE, O_WRONLY, 0); |
| @@ -861,6 +865,19 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 861 | 865 | ||
| 862 | unbind_to (count, Qnil); | 866 | unbind_to (count, Qnil); |
| 863 | 867 | ||
| 868 | if (synch_process_termsig) | ||
| 869 | { | ||
| 870 | char *signame; | ||
| 871 | |||
| 872 | synchronize_system_messages_locale (); | ||
| 873 | signame = strsignal (synch_process_termsig); | ||
| 874 | |||
| 875 | if (signame == 0) | ||
| 876 | signame = "unknown"; | ||
| 877 | |||
| 878 | synch_process_death = signame; | ||
| 879 | } | ||
| 880 | |||
| 864 | if (synch_process_death) | 881 | if (synch_process_death) |
| 865 | return code_convert_string_norecord (build_string (synch_process_death), | 882 | return code_convert_string_norecord (build_string (synch_process_death), |
| 866 | Vlocale_coding_system, 0); | 883 | Vlocale_coding_system, 0); |
| @@ -1567,3 +1584,6 @@ See `setenv' and `getenv'. */); | |||
| 1567 | #endif | 1584 | #endif |
| 1568 | defsubr (&Scall_process_region); | 1585 | defsubr (&Scall_process_region); |
| 1569 | } | 1586 | } |
| 1587 | |||
| 1588 | /* arch-tag: 769b8045-1df7-4d2b-8968-e3fb49017f95 | ||
| 1589 | (do not change this comment) */ | ||