aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.h
diff options
context:
space:
mode:
authorKen Raeburn2015-11-01 01:42:21 -0400
committerKen Raeburn2015-11-01 01:42:21 -0400
commit39372e1a1032521be74575bb06f95a3898fbae30 (patch)
tree754bd242a23d2358ea116126fcb0a629947bd9ec /src/process.h
parent6a3121904d76e3b2f63007341d48c5c1af55de80 (diff)
parente11aaee266da52937a3a031cb108fe13f68958c3 (diff)
downloademacs-39372e1a1032521be74575bb06f95a3898fbae30.tar.gz
emacs-39372e1a1032521be74575bb06f95a3898fbae30.zip
merge from trunk
Diffstat (limited to 'src/process.h')
-rw-r--r--src/process.h78
1 files changed, 41 insertions, 37 deletions
diff --git a/src/process.h b/src/process.h
index e8bafe689b1..01bf8775c99 100644
--- a/src/process.h
+++ b/src/process.h
@@ -1,5 +1,5 @@
1/* Definitions for asynchronous process control in GNU Emacs. 1/* Definitions for asynchronous process control in GNU Emacs.
2 Copyright (C) 1985, 1994, 2001-2013 Free Software Foundation, Inc. 2 Copyright (C) 1985, 1994, 2001-2015 Free Software Foundation, Inc.
3 3
4This file is part of GNU Emacs. 4This file is part of GNU Emacs.
5 5
@@ -16,6 +16,9 @@ GNU General Public License for more details.
16You should have received a copy of the GNU General Public License 16You should have received a copy of the GNU General Public License
17along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 17along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
18 18
19#ifndef EMACS_PROCESS_H
20#define EMACS_PROCESS_H
21
19#ifdef HAVE_SYS_TYPES_H 22#ifdef HAVE_SYS_TYPES_H
20#include <sys/types.h> 23#include <sys/types.h>
21#endif 24#endif
@@ -27,9 +30,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
27#endif 30#endif
28 31
29INLINE_HEADER_BEGIN 32INLINE_HEADER_BEGIN
30#ifndef PROCESS_INLINE
31# define PROCESS_INLINE INLINE
32#endif
33 33
34/* Bound on number of file descriptors opened on behalf of a process, 34/* Bound on number of file descriptors opened on behalf of a process,
35 that need to be closed. */ 35 that need to be closed. */
@@ -46,25 +46,25 @@ struct Lisp_Process
46 /* Name of subprocess terminal. */ 46 /* Name of subprocess terminal. */
47 Lisp_Object tty_name; 47 Lisp_Object tty_name;
48 48
49 /* Name of this process */ 49 /* Name of this process. */
50 Lisp_Object name; 50 Lisp_Object name;
51 51
52 /* List of command arguments that this process was run with. 52 /* List of command arguments that this process was run with.
53 Is set to t for a stopped network process; nil otherwise. */ 53 Is set to t for a stopped network process; nil otherwise. */
54 Lisp_Object command; 54 Lisp_Object command;
55 55
56 /* (funcall FILTER PROC STRING) (if FILTER is non-nil) 56 /* (funcall FILTER PROC STRING) (if FILTER is non-nil)
57 to dispose of a bunch of chars from the process all at once */ 57 to dispose of a bunch of chars from the process all at once. */
58 Lisp_Object filter; 58 Lisp_Object filter;
59 59
60 /* (funcall SENTINEL PROCESS) when process state changes */ 60 /* (funcall SENTINEL PROCESS) when process state changes. */
61 Lisp_Object sentinel; 61 Lisp_Object sentinel;
62 62
63 /* (funcall LOG SERVER CLIENT MESSAGE) when a server process 63 /* (funcall LOG SERVER CLIENT MESSAGE) when a server process
64 accepts a connection from a client. */ 64 accepts a connection from a client. */
65 Lisp_Object log; 65 Lisp_Object log;
66 66
67 /* Buffer that output is going to */ 67 /* Buffer that output is going to. */
68 Lisp_Object buffer; 68 Lisp_Object buffer;
69 69
70 /* t if this is a real child process. For a network or serial 70 /* t if this is a real child process. For a network or serial
@@ -76,10 +76,10 @@ struct Lisp_Process
76 /* Plist for programs to keep per-process state information, parameters, etc. */ 76 /* Plist for programs to keep per-process state information, parameters, etc. */
77 Lisp_Object plist; 77 Lisp_Object plist;
78 78
79 /* Symbol indicating the type of process: real, network, serial */ 79 /* Symbol indicating the type of process: real, network, serial. */
80 Lisp_Object type; 80 Lisp_Object type;
81 81
82 /* Marker set to end of last buffer-inserted output from this process */ 82 /* Marker set to end of last buffer-inserted output from this process. */
83 Lisp_Object mark; 83 Lisp_Object mark;
84 84
85 /* Symbol indicating status of process. 85 /* Symbol indicating status of process.
@@ -101,13 +101,16 @@ struct Lisp_Process
101 /* Working buffer for encoding. */ 101 /* Working buffer for encoding. */
102 Lisp_Object encoding_buf; 102 Lisp_Object encoding_buf;
103 103
104 /* Queue for storing waiting writes */ 104 /* Queue for storing waiting writes. */
105 Lisp_Object write_queue; 105 Lisp_Object write_queue;
106 106
107#ifdef HAVE_GNUTLS 107#ifdef HAVE_GNUTLS
108 Lisp_Object gnutls_cred_type; 108 Lisp_Object gnutls_cred_type;
109#endif 109#endif
110 110
111 /* Pipe process attached to the standard error of this process. */
112 Lisp_Object stderrproc;
113
111 /* The thread a process is linked to, or nil for any thread. */ 114 /* The thread a process is linked to, or nil for any thread. */
112 Lisp_Object thread; 115 Lisp_Object thread;
113 116
@@ -119,9 +122,9 @@ struct Lisp_Process
119 A value 0 is used for pseudo-processes such as network or serial 122 A value 0 is used for pseudo-processes such as network or serial
120 connections. */ 123 connections. */
121 pid_t pid; 124 pid_t pid;
122 /* Descriptor by which we read from this process */ 125 /* Descriptor by which we read from this process. */
123 int infd; 126 int infd;
124 /* Descriptor by which we write to this process */ 127 /* Descriptor by which we write to this process. */
125 int outfd; 128 int outfd;
126 /* Descriptors that were created for this process and that need 129 /* Descriptors that were created for this process and that need
127 closing. Unused entries are negative. */ 130 closing. Unused entries are negative. */
@@ -144,23 +147,23 @@ struct Lisp_Process
144 0 = nil, 1 = t, 2 = other. */ 147 0 = nil, 1 = t, 2 = other. */
145 unsigned int adaptive_read_buffering : 2; 148 unsigned int adaptive_read_buffering : 2;
146 /* Skip reading this process on next read. */ 149 /* Skip reading this process on next read. */
147 unsigned int read_output_skip : 1; 150 bool_bf read_output_skip : 1;
148 /* Non-nil means kill silently if Emacs is exited. 151 /* True means kill silently if Emacs is exited.
149 This is the inverse of the `query-on-exit' flag. */ 152 This is the inverse of the `query-on-exit' flag. */
150 unsigned int kill_without_query : 1; 153 bool_bf kill_without_query : 1;
151 /* Non-nil if communicating through a pty. */ 154 /* True if communicating through a pty. */
152 unsigned int pty_flag : 1; 155 bool_bf pty_flag : 1;
153 /* Flag to set coding-system of the process buffer from the 156 /* Flag to set coding-system of the process buffer from the
154 coding_system used to decode process output. */ 157 coding_system used to decode process output. */
155 unsigned int inherit_coding_system_flag : 1; 158 bool_bf inherit_coding_system_flag : 1;
156 /* Whether the process is alive, i.e., can be waited for. Running 159 /* Whether the process is alive, i.e., can be waited for. Running
157 processes can be waited for, but exited and fake processes cannot. */ 160 processes can be waited for, but exited and fake processes cannot. */
158 unsigned int alive : 1; 161 bool_bf alive : 1;
159 /* Record the process status in the raw form in which it comes from `wait'. 162 /* Record the process status in the raw form in which it comes from `wait'.
160 This is to avoid consing in a signal handler. The `raw_status_new' 163 This is to avoid consing in a signal handler. The `raw_status_new'
161 flag indicates that `raw_status' contains a new status that still 164 flag indicates that `raw_status' contains a new status that still
162 needs to be synced to `status'. */ 165 needs to be synced to `status'. */
163 unsigned int raw_status_new : 1; 166 bool_bf raw_status_new : 1;
164 int raw_status; 167 int raw_status;
165 168
166#ifdef HAVE_GNUTLS 169#ifdef HAVE_GNUTLS
@@ -168,9 +171,12 @@ struct Lisp_Process
168 gnutls_session_t gnutls_state; 171 gnutls_session_t gnutls_state;
169 gnutls_certificate_client_credentials gnutls_x509_cred; 172 gnutls_certificate_client_credentials gnutls_x509_cred;
170 gnutls_anon_client_credentials_t gnutls_anon_cred; 173 gnutls_anon_client_credentials_t gnutls_anon_cred;
174 gnutls_x509_crt_t gnutls_certificate;
175 unsigned int gnutls_peer_verification;
176 unsigned int gnutls_extra_peer_verification;
171 int gnutls_log_level; 177 int gnutls_log_level;
172 int gnutls_handshakes_tried; 178 int gnutls_handshakes_tried;
173 unsigned int gnutls_p : 1; 179 bool_bf gnutls_p : 1;
174#endif 180#endif
175}; 181};
176 182
@@ -182,14 +188,14 @@ struct Lisp_Process
182/* Most code should use these functions to set Lisp fields in struct 188/* Most code should use these functions to set Lisp fields in struct
183 process. */ 189 process. */
184 190
185PROCESS_INLINE void 191INLINE void
186pset_childp (struct Lisp_Process *p, Lisp_Object val) 192pset_childp (struct Lisp_Process *p, Lisp_Object val)
187{ 193{
188 p->childp = val; 194 p->childp = val;
189} 195}
190 196
191#ifdef HAVE_GNUTLS 197#ifdef HAVE_GNUTLS
192PROCESS_INLINE void 198INLINE void
193pset_gnutls_cred_type (struct Lisp_Process *p, Lisp_Object val) 199pset_gnutls_cred_type (struct Lisp_Process *p, Lisp_Object val)
194{ 200{
195 p->gnutls_cred_type = val; 201 p->gnutls_cred_type = val;
@@ -200,15 +206,6 @@ pset_gnutls_cred_type (struct Lisp_Process *p, Lisp_Object val)
200 when exiting. */ 206 when exiting. */
201extern bool inhibit_sentinels; 207extern bool inhibit_sentinels;
202 208
203extern Lisp_Object Qeuid, Qegid, Qcomm, Qstate, Qppid, Qpgrp, Qsess, Qttname;
204extern Lisp_Object Qminflt, Qmajflt, Qcminflt, Qcmajflt, Qutime, Qstime;
205extern Lisp_Object Qcutime, Qpri, Qnice, Qthcount, Qstart, Qvsize, Qrss, Qargs;
206extern Lisp_Object Quser, Qgroup, Qetime, Qpcpu, Qpmem, Qtpgid, Qcstime;
207extern Lisp_Object Qtime, Qctime;
208extern Lisp_Object QCspeed;
209extern Lisp_Object QCbytesize, QCstopbits, QCparity, Qodd, Qeven;
210extern Lisp_Object QCflowcontrol, Qhw, Qsw, QCsummary;
211
212/* Exit statuses for GNU programs that exec other programs. */ 209/* Exit statuses for GNU programs that exec other programs. */
213enum 210enum
214{ 211{
@@ -219,8 +216,6 @@ enum
219 216
220/* Defined in callproc.c. */ 217/* Defined in callproc.c. */
221 218
222extern void block_child_signal (void);
223extern void unblock_child_signal (void);
224extern Lisp_Object encode_current_directory (void); 219extern Lisp_Object encode_current_directory (void);
225extern void record_kill_process (struct Lisp_Process *, Lisp_Object); 220extern void record_kill_process (struct Lisp_Process *, Lisp_Object);
226 221
@@ -232,6 +227,8 @@ extern Lisp_Object system_process_attributes (Lisp_Object);
232/* Defined in process.c. */ 227/* Defined in process.c. */
233 228
234extern void record_deleted_pid (pid_t, Lisp_Object); 229extern void record_deleted_pid (pid_t, Lisp_Object);
230struct sockaddr;
231extern Lisp_Object conv_sockaddr_to_lisp (struct sockaddr *, int);
235extern void hold_keyboard_input (void); 232extern void hold_keyboard_input (void);
236extern void unhold_keyboard_input (void); 233extern void unhold_keyboard_input (void);
237extern bool kbd_on_hold_p (void); 234extern bool kbd_on_hold_p (void);
@@ -242,10 +239,17 @@ extern void add_read_fd (int fd, fd_callback func, void *data);
242extern void delete_read_fd (int fd); 239extern void delete_read_fd (int fd);
243extern void add_write_fd (int fd, fd_callback func, void *data); 240extern void add_write_fd (int fd, fd_callback func, void *data);
244extern void delete_write_fd (int fd); 241extern void delete_write_fd (int fd);
245#ifdef NS_IMPL_GNUSTEP
246extern void catch_child_signal (void); 242extern void catch_child_signal (void);
243
244#ifdef WINDOWSNT
245extern Lisp_Object network_interface_list (void);
246extern Lisp_Object network_interface_info (Lisp_Object);
247#endif 247#endif
248 248
249extern Lisp_Object remove_slash_colon (Lisp_Object);
250
249extern void update_processes_for_thread_death (Lisp_Object); 251extern void update_processes_for_thread_death (Lisp_Object);
250 252
251INLINE_HEADER_END 253INLINE_HEADER_END
254
255#endif /* EMACS_PROCESS_H */