X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/3d5ee10aa258a500e0b70b5eabe9d58cb3ab051e..d57f4dde80447f0fcdb1c31df7f0657fd2eea369:/src/process.h diff --git a/src/process.h b/src/process.h index 0c4e17e68c..37d220e987 100644 --- a/src/process.h +++ b/src/process.h @@ -27,9 +27,11 @@ along with GNU Emacs. If not, see . */ #endif INLINE_HEADER_BEGIN -#ifndef PROCESS_INLINE -# define PROCESS_INLINE INLINE -#endif + +/* Bound on number of file descriptors opened on behalf of a process, + that need to be closed. */ + +enum { PROCESS_OPEN_FDS = 6 }; /* This structure records information about a subprocess or network connection. */ @@ -115,6 +117,9 @@ struct Lisp_Process int infd; /* Descriptor by which we write to this process */ int outfd; + /* Descriptors that were created for this process and that need + closing. Unused entries are negative. */ + int open_fd[PROCESS_OPEN_FDS]; /* Event-count of last event in which this process changed status. */ EMACS_INT tick; /* Event-count of last such event reported. */ @@ -171,14 +176,14 @@ struct Lisp_Process /* Most code should use these functions to set Lisp fields in struct process. */ -PROCESS_INLINE void +INLINE void pset_childp (struct Lisp_Process *p, Lisp_Object val) { p->childp = val; } #ifdef HAVE_GNUTLS -PROCESS_INLINE void +INLINE void pset_gnutls_cred_type (struct Lisp_Process *p, Lisp_Object val) { p->gnutls_cred_type = val; @@ -198,15 +203,33 @@ extern Lisp_Object QCspeed; extern Lisp_Object QCbytesize, QCstopbits, QCparity, Qodd, Qeven; extern Lisp_Object QCflowcontrol, Qhw, Qsw, QCsummary; +/* Exit statuses for GNU programs that exec other programs. */ +enum +{ + EXIT_CANCELED = 125, /* Internal error prior to exec attempt. */ + EXIT_CANNOT_INVOKE = 126, /* Program located, but not usable. */ + EXIT_ENOENT = 127 /* Could not find program to exec. */ +}; + /* Defined in callproc.c. */ -extern void record_kill_process (struct Lisp_Process *); +extern void block_child_signal (void); +extern void unblock_child_signal (void); +extern Lisp_Object encode_current_directory (void); +extern void record_kill_process (struct Lisp_Process *, Lisp_Object); -/* Defined in process.c. */ +/* Defined in sysdep.c. */ extern Lisp_Object list_system_processes (void); extern Lisp_Object system_process_attributes (Lisp_Object); +/* Defined in process.c. */ + +extern void record_deleted_pid (pid_t, Lisp_Object); +struct sockaddr; +#ifdef WINDOWSNT +extern Lisp_Object conv_sockaddr_to_lisp (struct sockaddr *, int); +#endif extern void hold_keyboard_input (void); extern void unhold_keyboard_input (void); extern bool kbd_on_hold_p (void); @@ -221,4 +244,9 @@ extern void delete_write_fd (int fd); extern void catch_child_signal (void); #endif +#ifdef WINDOWSNT +extern Lisp_Object network_interface_list (void); +extern Lisp_Object network_interface_info (Lisp_Object); +#endif + INLINE_HEADER_END