diff options
| author | Miles Bader | 2006-12-07 04:14:14 +0000 |
|---|---|---|
| committer | Miles Bader | 2006-12-07 04:14:14 +0000 |
| commit | a0451a715e4ed018a02b825d0eb823424693d1de (patch) | |
| tree | d2b10fcc69c333ccc438d7a9ad116fbc1495fc9e /src/process.c | |
| parent | d324f894beea8b485792c779659e8e20c1cb699d (diff) | |
| parent | 12f7728e938fe5bb850ce2928637d1e349919142 (diff) | |
| download | emacs-a0451a715e4ed018a02b825d0eb823424693d1de.tar.gz emacs-a0451a715e4ed018a02b825d0eb823424693d1de.zip | |
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 523-544)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 168-171)
- Update from CVS
- Merge from emacs--devo--0
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-150
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 85 |
1 files changed, 42 insertions, 43 deletions
diff --git a/src/process.c b/src/process.c index 7042077471c..db7fcb8b201 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -149,7 +149,8 @@ Boston, MA 02110-1301, USA. */ | |||
| 149 | #include "atimer.h" | 149 | #include "atimer.h" |
| 150 | 150 | ||
| 151 | Lisp_Object Qprocessp; | 151 | Lisp_Object Qprocessp; |
| 152 | Lisp_Object Qrun, Qstop, Qsignal; | 152 | Lisp_Object Qrun, Qstop; |
| 153 | extern Lisp_Object Qsignal; | ||
| 153 | Lisp_Object Qopen, Qclosed, Qconnect, Qfailed, Qlisten; | 154 | Lisp_Object Qopen, Qclosed, Qconnect, Qfailed, Qlisten; |
| 154 | Lisp_Object Qlocal, Qipv4, Qdatagram; | 155 | Lisp_Object Qlocal, Qipv4, Qdatagram; |
| 155 | #ifdef AF_INET6 | 156 | #ifdef AF_INET6 |
| @@ -6127,8 +6128,8 @@ SIGCODE may be an integer, or a symbol whose name is a signal name. */) | |||
| 6127 | 6128 | ||
| 6128 | got_it: | 6129 | got_it: |
| 6129 | 6130 | ||
| 6130 | #define handle_signal(NAME, VALUE) \ | 6131 | #define parse_signal(NAME, VALUE) \ |
| 6131 | else if (!strcmp (name, NAME)) \ | 6132 | else if (!strcasecmp (name, NAME)) \ |
| 6132 | XSETINT (sigcode, VALUE) | 6133 | XSETINT (sigcode, VALUE) |
| 6133 | 6134 | ||
| 6134 | if (INTEGERP (sigcode)) | 6135 | if (INTEGERP (sigcode)) |
| @@ -6140,106 +6141,106 @@ SIGCODE may be an integer, or a symbol whose name is a signal name. */) | |||
| 6140 | CHECK_SYMBOL (sigcode); | 6141 | CHECK_SYMBOL (sigcode); |
| 6141 | name = SDATA (SYMBOL_NAME (sigcode)); | 6142 | name = SDATA (SYMBOL_NAME (sigcode)); |
| 6142 | 6143 | ||
| 6143 | if (!strncmp(name, "SIG", 3)) | 6144 | if (!strncasecmp(name, "sig", 3)) |
| 6144 | name += 3; | 6145 | name += 3; |
| 6145 | 6146 | ||
| 6146 | if (0) | 6147 | if (0) |
| 6147 | ; | 6148 | ; |
| 6149 | #ifdef SIGUSR1 | ||
| 6150 | parse_signal ("usr1", SIGUSR1); | ||
| 6151 | #endif | ||
| 6152 | #ifdef SIGUSR2 | ||
| 6153 | parse_signal ("usr2", SIGUSR2); | ||
| 6154 | #endif | ||
| 6155 | #ifdef SIGTERM | ||
| 6156 | parse_signal ("term", SIGTERM); | ||
| 6157 | #endif | ||
| 6148 | #ifdef SIGHUP | 6158 | #ifdef SIGHUP |
| 6149 | handle_signal ("HUP", SIGHUP); | 6159 | parse_signal ("hup", SIGHUP); |
| 6150 | #endif | 6160 | #endif |
| 6151 | #ifdef SIGINT | 6161 | #ifdef SIGINT |
| 6152 | handle_signal ("INT", SIGINT); | 6162 | parse_signal ("int", SIGINT); |
| 6153 | #endif | 6163 | #endif |
| 6154 | #ifdef SIGQUIT | 6164 | #ifdef SIGQUIT |
| 6155 | handle_signal ("QUIT", SIGQUIT); | 6165 | parse_signal ("quit", SIGQUIT); |
| 6156 | #endif | 6166 | #endif |
| 6157 | #ifdef SIGILL | 6167 | #ifdef SIGILL |
| 6158 | handle_signal ("ILL", SIGILL); | 6168 | parse_signal ("ill", SIGILL); |
| 6159 | #endif | 6169 | #endif |
| 6160 | #ifdef SIGABRT | 6170 | #ifdef SIGABRT |
| 6161 | handle_signal ("ABRT", SIGABRT); | 6171 | parse_signal ("abrt", SIGABRT); |
| 6162 | #endif | 6172 | #endif |
| 6163 | #ifdef SIGEMT | 6173 | #ifdef SIGEMT |
| 6164 | handle_signal ("EMT", SIGEMT); | 6174 | parse_signal ("emt", SIGEMT); |
| 6165 | #endif | 6175 | #endif |
| 6166 | #ifdef SIGKILL | 6176 | #ifdef SIGKILL |
| 6167 | handle_signal ("KILL", SIGKILL); | 6177 | parse_signal ("kill", SIGKILL); |
| 6168 | #endif | 6178 | #endif |
| 6169 | #ifdef SIGFPE | 6179 | #ifdef SIGFPE |
| 6170 | handle_signal ("FPE", SIGFPE); | 6180 | parse_signal ("fpe", SIGFPE); |
| 6171 | #endif | 6181 | #endif |
| 6172 | #ifdef SIGBUS | 6182 | #ifdef SIGBUS |
| 6173 | handle_signal ("BUS", SIGBUS); | 6183 | parse_signal ("bus", SIGBUS); |
| 6174 | #endif | 6184 | #endif |
| 6175 | #ifdef SIGSEGV | 6185 | #ifdef SIGSEGV |
| 6176 | handle_signal ("SEGV", SIGSEGV); | 6186 | parse_signal ("segv", SIGSEGV); |
| 6177 | #endif | 6187 | #endif |
| 6178 | #ifdef SIGSYS | 6188 | #ifdef SIGSYS |
| 6179 | handle_signal ("SYS", SIGSYS); | 6189 | parse_signal ("sys", SIGSYS); |
| 6180 | #endif | 6190 | #endif |
| 6181 | #ifdef SIGPIPE | 6191 | #ifdef SIGPIPE |
| 6182 | handle_signal ("PIPE", SIGPIPE); | 6192 | parse_signal ("pipe", SIGPIPE); |
| 6183 | #endif | 6193 | #endif |
| 6184 | #ifdef SIGALRM | 6194 | #ifdef SIGALRM |
| 6185 | handle_signal ("ALRM", SIGALRM); | 6195 | parse_signal ("alrm", SIGALRM); |
| 6186 | #endif | ||
| 6187 | #ifdef SIGTERM | ||
| 6188 | handle_signal ("TERM", SIGTERM); | ||
| 6189 | #endif | 6196 | #endif |
| 6190 | #ifdef SIGURG | 6197 | #ifdef SIGURG |
| 6191 | handle_signal ("URG", SIGURG); | 6198 | parse_signal ("urg", SIGURG); |
| 6192 | #endif | 6199 | #endif |
| 6193 | #ifdef SIGSTOP | 6200 | #ifdef SIGSTOP |
| 6194 | handle_signal ("STOP", SIGSTOP); | 6201 | parse_signal ("stop", SIGSTOP); |
| 6195 | #endif | 6202 | #endif |
| 6196 | #ifdef SIGTSTP | 6203 | #ifdef SIGTSTP |
| 6197 | handle_signal ("TSTP", SIGTSTP); | 6204 | parse_signal ("tstp", SIGTSTP); |
| 6198 | #endif | 6205 | #endif |
| 6199 | #ifdef SIGCONT | 6206 | #ifdef SIGCONT |
| 6200 | handle_signal ("CONT", SIGCONT); | 6207 | parse_signal ("cont", SIGCONT); |
| 6201 | #endif | 6208 | #endif |
| 6202 | #ifdef SIGCHLD | 6209 | #ifdef SIGCHLD |
| 6203 | handle_signal ("CHLD", SIGCHLD); | 6210 | parse_signal ("chld", SIGCHLD); |
| 6204 | #endif | 6211 | #endif |
| 6205 | #ifdef SIGTTIN | 6212 | #ifdef SIGTTIN |
| 6206 | handle_signal ("TTIN", SIGTTIN); | 6213 | parse_signal ("ttin", SIGTTIN); |
| 6207 | #endif | 6214 | #endif |
| 6208 | #ifdef SIGTTOU | 6215 | #ifdef SIGTTOU |
| 6209 | handle_signal ("TTOU", SIGTTOU); | 6216 | parse_signal ("ttou", SIGTTOU); |
| 6210 | #endif | 6217 | #endif |
| 6211 | #ifdef SIGIO | 6218 | #ifdef SIGIO |
| 6212 | handle_signal ("IO", SIGIO); | 6219 | parse_signal ("io", SIGIO); |
| 6213 | #endif | 6220 | #endif |
| 6214 | #ifdef SIGXCPU | 6221 | #ifdef SIGXCPU |
| 6215 | handle_signal ("XCPU", SIGXCPU); | 6222 | parse_signal ("xcpu", SIGXCPU); |
| 6216 | #endif | 6223 | #endif |
| 6217 | #ifdef SIGXFSZ | 6224 | #ifdef SIGXFSZ |
| 6218 | handle_signal ("XFSZ", SIGXFSZ); | 6225 | parse_signal ("xfsz", SIGXFSZ); |
| 6219 | #endif | 6226 | #endif |
| 6220 | #ifdef SIGVTALRM | 6227 | #ifdef SIGVTALRM |
| 6221 | handle_signal ("VTALRM", SIGVTALRM); | 6228 | parse_signal ("vtalrm", SIGVTALRM); |
| 6222 | #endif | 6229 | #endif |
| 6223 | #ifdef SIGPROF | 6230 | #ifdef SIGPROF |
| 6224 | handle_signal ("PROF", SIGPROF); | 6231 | parse_signal ("prof", SIGPROF); |
| 6225 | #endif | 6232 | #endif |
| 6226 | #ifdef SIGWINCH | 6233 | #ifdef SIGWINCH |
| 6227 | handle_signal ("WINCH", SIGWINCH); | 6234 | parse_signal ("winch", SIGWINCH); |
| 6228 | #endif | 6235 | #endif |
| 6229 | #ifdef SIGINFO | 6236 | #ifdef SIGINFO |
| 6230 | handle_signal ("INFO", SIGINFO); | 6237 | parse_signal ("info", SIGINFO); |
| 6231 | #endif | ||
| 6232 | #ifdef SIGUSR1 | ||
| 6233 | handle_signal ("USR1", SIGUSR1); | ||
| 6234 | #endif | ||
| 6235 | #ifdef SIGUSR2 | ||
| 6236 | handle_signal ("USR2", SIGUSR2); | ||
| 6237 | #endif | 6238 | #endif |
| 6238 | else | 6239 | else |
| 6239 | error ("Undefined signal name %s", name); | 6240 | error ("Undefined signal name %s", name); |
| 6240 | } | 6241 | } |
| 6241 | 6242 | ||
| 6242 | #undef handle_signal | 6243 | #undef parse_signal |
| 6243 | 6244 | ||
| 6244 | return make_number (kill (pid, XINT (sigcode))); | 6245 | return make_number (kill (pid, XINT (sigcode))); |
| 6245 | } | 6246 | } |
| @@ -6985,8 +6986,6 @@ syms_of_process () | |||
| 6985 | staticpro (&Qrun); | 6986 | staticpro (&Qrun); |
| 6986 | Qstop = intern ("stop"); | 6987 | Qstop = intern ("stop"); |
| 6987 | staticpro (&Qstop); | 6988 | staticpro (&Qstop); |
| 6988 | Qsignal = intern ("signal"); | ||
| 6989 | staticpro (&Qsignal); | ||
| 6990 | 6989 | ||
| 6991 | /* Qexit is already staticpro'd by syms_of_eval; don't staticpro it | 6990 | /* Qexit is already staticpro'd by syms_of_eval; don't staticpro it |
| 6992 | here again. | 6991 | here again. |