diff options
| author | Dan Nicolaescu | 2008-07-31 05:33:56 +0000 |
|---|---|---|
| committer | Dan Nicolaescu | 2008-07-31 05:33:56 +0000 |
| commit | 7c2fb837ec2f0e0a509f22ccc35f9b43476a6119 (patch) | |
| tree | 7ec796ef1f109e43c8be2cc8cfb8dc579cfa8033 /src/process.c | |
| parent | 69ab3201ca6f6ef1414d678fd9cb13dd4d6f6b95 (diff) | |
| download | emacs-7c2fb837ec2f0e0a509f22ccc35f9b43476a6119.tar.gz emacs-7c2fb837ec2f0e0a509f22ccc35f9b43476a6119.zip | |
* bitmaps/README:
* xfns.c:
* termcap.c:
* term.c:
* syswait.h:
* systty.h:
* systime.h:
* syssignal.h:
* sysdep.c:
* process.h:
* process.c:
* print.c:
* ndir.h:
* lread.c:
* keyboard.c:
* getpagesize.h:
* floatfns.c:
* fileio.c:
* emacs.c:
* doc.c:
* dispnew.c:
* dired.c:
* data.c:
* callproc.c:
* buffer.c:
* README:
* Makefile.in:
* s/template.h:
* s/msdos.h:
* m/vax.h: Remove VMS support.
* s/vms.h:
* vlimit.h:
* uaf.h:
* temacs.opt:
* param.h:
* ioctl.h: Remove file.
* descrip.mms:
* compile.com: Remove file.
* Create.c: Remove VMS support.
* message.el (Module):
* gnus-start.el (Module):
* gnus-registry.el (Module):
* textmodes/texinfmt.el:
* nxml/nxml-enc.el:
* mail/feedmail.el:
* international/mule.el:
* international/latexenc.el:
* emulation/viper-util.el:
* emulation/viper-init.el:
* emulation/viper-ex.el:
* emacs-lisp/bytecomp.el:
* version.el:
* subr.el:
* startup.el:
* sort.el:
* shadowfile.el:
* recentf.el:
* printing.el:
* paths.el:
* minibuffer.el:
* ls-lisp.el:
* loadup.el:
* hippie-exp.el:
* finder.el:
* files.el:
* ediff-util.el:
* ediff-ptch.el:
* ediff-init.el:
* ediff-diff.el:
* dired.el:
* dired-aux.el:
* cus-edit.el:
* bindings.el:
* arc-mode.el:
* add-log.el: Remove VMS support.
* obsolete/vmsproc.el:
* obsolete/vms-pmail.el:
* obsolete/vms-patch.el: Remove file.
* etags.c:
* emacsclient.c: Remove VMS support.
* termcap.src: Remove file.
* README:
* PROBLEMS:
* MACHINES: Remove VMS info.
* ediff.texi: Remove VMS support.
* os.texi:
* intro.texi:
* files.texi: Remove VMS support.
* emacs.texi: Remove VMS support.
* make-dist:
* README: Remove VMS support.
* vms: Remove directory.
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 127 |
1 files changed, 1 insertions, 126 deletions
diff --git a/src/process.c b/src/process.c index 3d64ff2cdd0..f343ccc0cc4 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -159,11 +159,7 @@ extern Lisp_Object QCfilter; | |||
| 159 | #endif /* HAVE_SOCKETS */ | 159 | #endif /* HAVE_SOCKETS */ |
| 160 | 160 | ||
| 161 | /* Define first descriptor number available for subprocesses. */ | 161 | /* Define first descriptor number available for subprocesses. */ |
| 162 | #ifdef VMS | ||
| 163 | #define FIRST_PROC_DESC 1 | ||
| 164 | #else /* Not VMS */ | ||
| 165 | #define FIRST_PROC_DESC 3 | 162 | #define FIRST_PROC_DESC 3 |
| 166 | #endif | ||
| 167 | 163 | ||
| 168 | /* Define SIGCHLD as an alias for SIGCLD. There are many conditionals | 164 | /* Define SIGCHLD as an alias for SIGCLD. There are many conditionals |
| 169 | testing SIGCHLD. */ | 165 | testing SIGCHLD. */ |
| @@ -192,9 +188,6 @@ extern void serial_configure (struct Lisp_Process *p, Lisp_Object contact); | |||
| 192 | #ifndef USE_CRT_DLL | 188 | #ifndef USE_CRT_DLL |
| 193 | extern int errno; | 189 | extern int errno; |
| 194 | #endif | 190 | #endif |
| 195 | #ifdef VMS | ||
| 196 | extern char *sys_errlist[]; | ||
| 197 | #endif | ||
| 198 | 191 | ||
| 199 | #ifndef HAVE_H_ERRNO | 192 | #ifndef HAVE_H_ERRNO |
| 200 | extern int h_errno; | 193 | extern int h_errno; |
| @@ -1417,12 +1410,7 @@ list_processes_1 (query_only) | |||
| 1417 | { | 1410 | { |
| 1418 | Lisp_Object tem; | 1411 | Lisp_Object tem; |
| 1419 | tem = Fcar (Fcdr (p->status)); | 1412 | tem = Fcar (Fcdr (p->status)); |
| 1420 | #ifdef VMS | 1413 | Fprinc (symbol, Qnil); |
| 1421 | if (XINT (tem) < NSIG) | ||
| 1422 | write_string (sys_errlist [XINT (tem)], -1); | ||
| 1423 | else | ||
| 1424 | #endif | ||
| 1425 | Fprinc (symbol, Qnil); | ||
| 1426 | } | 1414 | } |
| 1427 | else if (NETCONN1_P (p) || SERIALCONN1_P (p)) | 1415 | else if (NETCONN1_P (p) || SERIALCONN1_P (p)) |
| 1428 | { | 1416 | { |
| @@ -1587,12 +1575,7 @@ usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */) | |||
| 1587 | register Lisp_Object *args; | 1575 | register Lisp_Object *args; |
| 1588 | { | 1576 | { |
| 1589 | Lisp_Object buffer, name, program, proc, current_dir, tem; | 1577 | Lisp_Object buffer, name, program, proc, current_dir, tem; |
| 1590 | #ifdef VMS | ||
| 1591 | register unsigned char *new_argv; | ||
| 1592 | int len; | ||
| 1593 | #else | ||
| 1594 | register unsigned char **new_argv; | 1578 | register unsigned char **new_argv; |
| 1595 | #endif | ||
| 1596 | register int i; | 1579 | register int i; |
| 1597 | int count = SPECPDL_INDEX (); | 1580 | int count = SPECPDL_INDEX (); |
| 1598 | 1581 | ||
| @@ -1709,28 +1692,6 @@ usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */) | |||
| 1709 | XPROCESS (proc)->encode_coding_system = val; | 1692 | XPROCESS (proc)->encode_coding_system = val; |
| 1710 | } | 1693 | } |
| 1711 | 1694 | ||
| 1712 | #ifdef VMS | ||
| 1713 | /* Make a one member argv with all args concatenated | ||
| 1714 | together separated by a blank. */ | ||
| 1715 | len = SBYTES (program) + 2; | ||
| 1716 | for (i = 3; i < nargs; i++) | ||
| 1717 | { | ||
| 1718 | tem = args[i]; | ||
| 1719 | CHECK_STRING (tem); | ||
| 1720 | len += SBYTES (tem) + 1; /* count the blank */ | ||
| 1721 | } | ||
| 1722 | new_argv = (unsigned char *) alloca (len); | ||
| 1723 | strcpy (new_argv, SDATA (program)); | ||
| 1724 | for (i = 3; i < nargs; i++) | ||
| 1725 | { | ||
| 1726 | tem = args[i]; | ||
| 1727 | CHECK_STRING (tem); | ||
| 1728 | strcat (new_argv, " "); | ||
| 1729 | strcat (new_argv, SDATA (tem)); | ||
| 1730 | } | ||
| 1731 | /* Need to add code here to check for program existence on VMS */ | ||
| 1732 | |||
| 1733 | #else /* not VMS */ | ||
| 1734 | new_argv = (unsigned char **) alloca ((nargs - 1) * sizeof (char *)); | 1695 | new_argv = (unsigned char **) alloca ((nargs - 1) * sizeof (char *)); |
| 1735 | 1696 | ||
| 1736 | /* If program file name is not absolute, search our path for it. | 1697 | /* If program file name is not absolute, search our path for it. |
| @@ -1782,7 +1743,6 @@ usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */) | |||
| 1782 | new_argv[i - 2] = SDATA (tem); | 1743 | new_argv[i - 2] = SDATA (tem); |
| 1783 | } | 1744 | } |
| 1784 | new_argv[i - 2] = 0; | 1745 | new_argv[i - 2] = 0; |
| 1785 | #endif /* not VMS */ | ||
| 1786 | 1746 | ||
| 1787 | XPROCESS (proc)->decoding_buf = make_uninit_string (0); | 1747 | XPROCESS (proc)->decoding_buf = make_uninit_string (0); |
| 1788 | XPROCESS (proc)->decoding_carryover = 0; | 1748 | XPROCESS (proc)->decoding_carryover = 0; |
| @@ -1841,7 +1801,6 @@ create_process_sigchld () | |||
| 1841 | #endif | 1801 | #endif |
| 1842 | #endif | 1802 | #endif |
| 1843 | 1803 | ||
| 1844 | #ifndef VMS /* VMS version of this function is in vmsproc.c. */ | ||
| 1845 | void | 1804 | void |
| 1846 | create_process (process, new_argv, current_dir) | 1805 | create_process (process, new_argv, current_dir) |
| 1847 | Lisp_Object process; | 1806 | Lisp_Object process; |
| @@ -2285,7 +2244,6 @@ create_process (process, new_argv, current_dir) | |||
| 2285 | if (pid < 0) | 2244 | if (pid < 0) |
| 2286 | report_file_error ("Doing vfork", Qnil); | 2245 | report_file_error ("Doing vfork", Qnil); |
| 2287 | } | 2246 | } |
| 2288 | #endif /* not VMS */ | ||
| 2289 | 2247 | ||
| 2290 | 2248 | ||
| 2291 | #ifdef HAVE_SOCKETS | 2249 | #ifdef HAVE_SOCKETS |
| @@ -4098,19 +4056,9 @@ deactivate_process (proc) | |||
| 4098 | { | 4056 | { |
| 4099 | /* Beware SIGCHLD hereabouts. */ | 4057 | /* Beware SIGCHLD hereabouts. */ |
| 4100 | flush_pending_output (inchannel); | 4058 | flush_pending_output (inchannel); |
| 4101 | #ifdef VMS | ||
| 4102 | { | ||
| 4103 | VMS_PROC_STUFF *get_vms_process_pointer (), *vs; | ||
| 4104 | sys$dassgn (outchannel); | ||
| 4105 | vs = get_vms_process_pointer (p->pid); | ||
| 4106 | if (vs) | ||
| 4107 | give_back_vms_process_stuff (vs); | ||
| 4108 | } | ||
| 4109 | #else | ||
| 4110 | emacs_close (inchannel); | 4059 | emacs_close (inchannel); |
| 4111 | if (outchannel >= 0 && outchannel != inchannel) | 4060 | if (outchannel >= 0 && outchannel != inchannel) |
| 4112 | emacs_close (outchannel); | 4061 | emacs_close (outchannel); |
| 4113 | #endif | ||
| 4114 | 4062 | ||
| 4115 | p->infd = -1; | 4063 | p->infd = -1; |
| 4116 | p->outfd = -1; | 4064 | p->outfd = -1; |
| @@ -5231,37 +5179,6 @@ read_process_output (proc, channel) | |||
| 5231 | int carryover = p->decoding_carryover; | 5179 | int carryover = p->decoding_carryover; |
| 5232 | int readmax = 4096; | 5180 | int readmax = 4096; |
| 5233 | 5181 | ||
| 5234 | #ifdef VMS | ||
| 5235 | VMS_PROC_STUFF *vs, *get_vms_process_pointer(); | ||
| 5236 | |||
| 5237 | vs = get_vms_process_pointer (p->pid); | ||
| 5238 | if (vs) | ||
| 5239 | { | ||
| 5240 | if (!vs->iosb[0]) | ||
| 5241 | return (0); /* Really weird if it does this */ | ||
| 5242 | if (!(vs->iosb[0] & 1)) | ||
| 5243 | return -1; /* I/O error */ | ||
| 5244 | } | ||
| 5245 | else | ||
| 5246 | error ("Could not get VMS process pointer"); | ||
| 5247 | chars = vs->inputBuffer; | ||
| 5248 | nbytes = clean_vms_buffer (chars, vs->iosb[1]); | ||
| 5249 | if (nbytes <= 0) | ||
| 5250 | { | ||
| 5251 | start_vms_process_read (vs); /* Crank up the next read on the process */ | ||
| 5252 | return 1; /* Nothing worth printing, say we got 1 */ | ||
| 5253 | } | ||
| 5254 | if (carryover > 0) | ||
| 5255 | { | ||
| 5256 | /* The data carried over in the previous decoding (which are at | ||
| 5257 | the tail of decoding buffer) should be prepended to the new | ||
| 5258 | data read to decode all together. */ | ||
| 5259 | chars = (char *) alloca (nbytes + carryover); | ||
| 5260 | bcopy (SDATA (p->decoding_buf), buf, carryover); | ||
| 5261 | bcopy (vs->inputBuffer, chars + carryover, nbytes); | ||
| 5262 | } | ||
| 5263 | #else /* not VMS */ | ||
| 5264 | |||
| 5265 | chars = (char *) alloca (carryover + readmax); | 5182 | chars = (char *) alloca (carryover + readmax); |
| 5266 | if (carryover) | 5183 | if (carryover) |
| 5267 | /* See the comment above. */ | 5184 | /* See the comment above. */ |
| @@ -5318,7 +5235,6 @@ read_process_output (proc, channel) | |||
| 5318 | else | 5235 | else |
| 5319 | nbytes = nbytes + 1; | 5236 | nbytes = nbytes + 1; |
| 5320 | } | 5237 | } |
| 5321 | #endif /* not VMS */ | ||
| 5322 | 5238 | ||
| 5323 | p->decoding_carryover = 0; | 5239 | p->decoding_carryover = 0; |
| 5324 | 5240 | ||
| @@ -5441,9 +5357,6 @@ read_process_output (proc, channel) | |||
| 5441 | if (waiting_for_user_input_p == -1) | 5357 | if (waiting_for_user_input_p == -1) |
| 5442 | record_asynch_buffer_change (); | 5358 | record_asynch_buffer_change (); |
| 5443 | 5359 | ||
| 5444 | #ifdef VMS | ||
| 5445 | start_vms_process_read (vs); | ||
| 5446 | #endif | ||
| 5447 | unbind_to (count, Qnil); | 5360 | unbind_to (count, Qnil); |
| 5448 | return nbytes; | 5361 | return nbytes; |
| 5449 | } | 5362 | } |
| @@ -5566,9 +5479,6 @@ read_process_output (proc, channel) | |||
| 5566 | SET_PT_BOTH (opoint, opoint_byte); | 5479 | SET_PT_BOTH (opoint, opoint_byte); |
| 5567 | set_buffer_internal (old); | 5480 | set_buffer_internal (old); |
| 5568 | } | 5481 | } |
| 5569 | #ifdef VMS | ||
| 5570 | start_vms_process_read (vs); | ||
| 5571 | #endif | ||
| 5572 | return nbytes; | 5482 | return nbytes; |
| 5573 | } | 5483 | } |
| 5574 | 5484 | ||
| @@ -5620,10 +5530,6 @@ send_process (proc, buf, len, object) | |||
| 5620 | 5530 | ||
| 5621 | GCPRO1 (object); | 5531 | GCPRO1 (object); |
| 5622 | 5532 | ||
| 5623 | #ifdef VMS | ||
| 5624 | VMS_PROC_STUFF *vs, *get_vms_process_pointer(); | ||
| 5625 | #endif /* VMS */ | ||
| 5626 | |||
| 5627 | if (p->raw_status_new) | 5533 | if (p->raw_status_new) |
| 5628 | update_status (p); | 5534 | update_status (p); |
| 5629 | if (! EQ (p->status, Qrun)) | 5535 | if (! EQ (p->status, Qrun)) |
| @@ -5704,14 +5610,6 @@ send_process (proc, buf, len, object) | |||
| 5704 | buf = SDATA (coding->dst_object); | 5610 | buf = SDATA (coding->dst_object); |
| 5705 | } | 5611 | } |
| 5706 | 5612 | ||
| 5707 | #ifdef VMS | ||
| 5708 | vs = get_vms_process_pointer (p->pid); | ||
| 5709 | if (vs == 0) | ||
| 5710 | error ("Could not find this process: %x", p->pid); | ||
| 5711 | else if (write_to_vms_process (vs, buf, len)) | ||
| 5712 | ; | ||
| 5713 | #else /* not VMS */ | ||
| 5714 | |||
| 5715 | if (pty_max_bytes == 0) | 5613 | if (pty_max_bytes == 0) |
| 5716 | { | 5614 | { |
| 5717 | #if defined (HAVE_FPATHCONF) && defined (_PC_MAX_CANON) | 5615 | #if defined (HAVE_FPATHCONF) && defined (_PC_MAX_CANON) |
| @@ -5873,23 +5771,16 @@ send_process (proc, buf, len, object) | |||
| 5873 | Fprocess_send_eof (proc); | 5771 | Fprocess_send_eof (proc); |
| 5874 | } | 5772 | } |
| 5875 | } | 5773 | } |
| 5876 | #endif /* not VMS */ | ||
| 5877 | else | 5774 | else |
| 5878 | { | 5775 | { |
| 5879 | signal (SIGPIPE, old_sigpipe); | 5776 | signal (SIGPIPE, old_sigpipe); |
| 5880 | #ifndef VMS | ||
| 5881 | proc = process_sent_to; | 5777 | proc = process_sent_to; |
| 5882 | p = XPROCESS (proc); | 5778 | p = XPROCESS (proc); |
| 5883 | #endif | ||
| 5884 | p->raw_status_new = 0; | 5779 | p->raw_status_new = 0; |
| 5885 | p->status = Fcons (Qexit, Fcons (make_number (256), Qnil)); | 5780 | p->status = Fcons (Qexit, Fcons (make_number (256), Qnil)); |
| 5886 | p->tick = ++process_tick; | 5781 | p->tick = ++process_tick; |
| 5887 | deactivate_process (proc); | 5782 | deactivate_process (proc); |
| 5888 | #ifdef VMS | ||
| 5889 | error ("Error writing to process %s; closed it", SDATA (p->name)); | ||
| 5890 | #else | ||
| 5891 | error ("SIGPIPE raised on process %s; closed it", SDATA (p->name)); | 5783 | error ("SIGPIPE raised on process %s; closed it", SDATA (p->name)); |
| 5892 | #endif | ||
| 5893 | } | 5784 | } |
| 5894 | 5785 | ||
| 5895 | UNGCPRO; | 5786 | UNGCPRO; |
| @@ -6193,20 +6084,8 @@ process_send_signal (process, signo, current_group, nomsg) | |||
| 6193 | break; | 6084 | break; |
| 6194 | #endif /* ! defined (SIGCONT) */ | 6085 | #endif /* ! defined (SIGCONT) */ |
| 6195 | case SIGINT: | 6086 | case SIGINT: |
| 6196 | #ifdef VMS | ||
| 6197 | send_process (proc, "\003", 1, Qnil); /* ^C */ | ||
| 6198 | goto whoosh; | ||
| 6199 | #endif | ||
| 6200 | case SIGQUIT: | 6087 | case SIGQUIT: |
| 6201 | #ifdef VMS | ||
| 6202 | send_process (proc, "\031", 1, Qnil); /* ^Y */ | ||
| 6203 | goto whoosh; | ||
| 6204 | #endif | ||
| 6205 | case SIGKILL: | 6088 | case SIGKILL: |
| 6206 | #ifdef VMS | ||
| 6207 | sys$forcex (&(p->pid), 0, 1); | ||
| 6208 | whoosh: | ||
| 6209 | #endif | ||
| 6210 | flush_pending_output (p->infd); | 6089 | flush_pending_output (p->infd); |
| 6211 | break; | 6090 | break; |
| 6212 | } | 6091 | } |
| @@ -6547,9 +6426,6 @@ process has been transmitted to the serial port. */) | |||
| 6547 | send_process (proc, "", 0, Qnil); | 6426 | send_process (proc, "", 0, Qnil); |
| 6548 | } | 6427 | } |
| 6549 | 6428 | ||
| 6550 | #ifdef VMS | ||
| 6551 | send_process (proc, "\032", 1, Qnil); /* ^z */ | ||
| 6552 | #else | ||
| 6553 | if (XPROCESS (proc)->pty_flag) | 6429 | if (XPROCESS (proc)->pty_flag) |
| 6554 | send_process (proc, "\004", 1, Qnil); | 6430 | send_process (proc, "\004", 1, Qnil); |
| 6555 | else if (EQ (XPROCESS (proc)->type, Qserial)) | 6431 | else if (EQ (XPROCESS (proc)->type, Qserial)) |
| @@ -6594,7 +6470,6 @@ process has been transmitted to the serial port. */) | |||
| 6594 | 6470 | ||
| 6595 | XPROCESS (proc)->outfd = new_outfd; | 6471 | XPROCESS (proc)->outfd = new_outfd; |
| 6596 | } | 6472 | } |
| 6597 | #endif /* VMS */ | ||
| 6598 | return process; | 6473 | return process; |
| 6599 | } | 6474 | } |
| 6600 | 6475 | ||