aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/process.h')
-rw-r--r--src/process.h33
1 files changed, 23 insertions, 10 deletions
diff --git a/src/process.h b/src/process.h
index 649056a99ff..43cc7ea33c0 100644
--- a/src/process.h
+++ b/src/process.h
@@ -26,11 +26,13 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
26#include "gnutls.h" 26#include "gnutls.h"
27#endif 27#endif
28 28
29/* This structure records information about a subprocess 29/* Most code should use these macros to set
30 or network connection. 30 Lisp fields in struct Lisp_Process. */
31 31
32 Every field in this structure except for the header 32#define PSET(p, field, value) ((p)->field = (value))
33 must be a Lisp_Object, for GC's sake. */ 33
34/* This structure records information about a subprocess
35 or network connection. */
34 36
35struct Lisp_Process 37struct Lisp_Process
36 { 38 {
@@ -38,45 +40,62 @@ struct Lisp_Process
38 40
39 /* Name of subprocess terminal. */ 41 /* Name of subprocess terminal. */
40 Lisp_Object tty_name; 42 Lisp_Object tty_name;
43
41 /* Name of this process */ 44 /* Name of this process */
42 Lisp_Object name; 45 Lisp_Object name;
46
43 /* List of command arguments that this process was run with. 47 /* List of command arguments that this process was run with.
44 Is set to t for a stopped network process; nil otherwise. */ 48 Is set to t for a stopped network process; nil otherwise. */
45 Lisp_Object command; 49 Lisp_Object command;
50
46 /* (funcall FILTER PROC STRING) (if FILTER is non-nil) 51 /* (funcall FILTER PROC STRING) (if FILTER is non-nil)
47 to dispose of a bunch of chars from the process all at once */ 52 to dispose of a bunch of chars from the process all at once */
48 Lisp_Object filter; 53 Lisp_Object filter;
54
49 /* (funcall SENTINEL PROCESS) when process state changes */ 55 /* (funcall SENTINEL PROCESS) when process state changes */
50 Lisp_Object sentinel; 56 Lisp_Object sentinel;
57
51 /* (funcall LOG SERVER CLIENT MESSAGE) when a server process 58 /* (funcall LOG SERVER CLIENT MESSAGE) when a server process
52 accepts a connection from a client. */ 59 accepts a connection from a client. */
53 Lisp_Object log; 60 Lisp_Object log;
61
54 /* Buffer that output is going to */ 62 /* Buffer that output is going to */
55 Lisp_Object buffer; 63 Lisp_Object buffer;
64
56 /* t if this is a real child process. For a network or serial 65 /* t if this is a real child process. For a network or serial
57 connection, it is a plist based on the arguments to 66 connection, it is a plist based on the arguments to
58 make-network-process or make-serial-process. */ 67 make-network-process or make-serial-process. */
68
59 Lisp_Object childp; 69 Lisp_Object childp;
70
60 /* Plist for programs to keep per-process state information, parameters, etc. */ 71 /* Plist for programs to keep per-process state information, parameters, etc. */
61 Lisp_Object plist; 72 Lisp_Object plist;
73
62 /* Symbol indicating the type of process: real, network, serial */ 74 /* Symbol indicating the type of process: real, network, serial */
63 Lisp_Object type; 75 Lisp_Object type;
76
64 /* Marker set to end of last buffer-inserted output from this process */ 77 /* Marker set to end of last buffer-inserted output from this process */
65 Lisp_Object mark; 78 Lisp_Object mark;
79
66 /* Symbol indicating status of process. 80 /* Symbol indicating status of process.
67 This may be a symbol: run, open, or closed. 81 This may be a symbol: run, open, or closed.
68 Or it may be a list, whose car is stop, exit or signal 82 Or it may be a list, whose car is stop, exit or signal
69 and whose cdr is a pair (EXIT_CODE . COREDUMP_FLAG) 83 and whose cdr is a pair (EXIT_CODE . COREDUMP_FLAG)
70 or (SIGNAL_NUMBER . COREDUMP_FLAG). */ 84 or (SIGNAL_NUMBER . COREDUMP_FLAG). */
71 Lisp_Object status; 85 Lisp_Object status;
86
72 /* Coding-system for decoding the input from this process. */ 87 /* Coding-system for decoding the input from this process. */
73 Lisp_Object decode_coding_system; 88 Lisp_Object decode_coding_system;
89
74 /* Working buffer for decoding. */ 90 /* Working buffer for decoding. */
75 Lisp_Object decoding_buf; 91 Lisp_Object decoding_buf;
92
76 /* Coding-system for encoding the output to this process. */ 93 /* Coding-system for encoding the output to this process. */
77 Lisp_Object encode_coding_system; 94 Lisp_Object encode_coding_system;
95
78 /* Working buffer for encoding. */ 96 /* Working buffer for encoding. */
79 Lisp_Object encoding_buf; 97 Lisp_Object encoding_buf;
98
80 /* Queue for storing waiting writes */ 99 /* Queue for storing waiting writes */
81 Lisp_Object write_queue; 100 Lisp_Object write_queue;
82 101
@@ -163,12 +182,6 @@ extern int synch_process_termsig;
163 this is exit code of synchronous subprocess. */ 182 this is exit code of synchronous subprocess. */
164extern int synch_process_retcode; 183extern int synch_process_retcode;
165 184
166/* The name of the file open to get a null file, or a data sink.
167 MS-DOS, and OS/2 redefine this. */
168#ifndef NULL_DEVICE
169#define NULL_DEVICE "/dev/null"
170#endif
171
172/* Nonzero means don't run process sentinels. This is used 185/* Nonzero means don't run process sentinels. This is used
173 when exiting. */ 186 when exiting. */
174extern int inhibit_sentinels; 187extern int inhibit_sentinels;