aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c50
1 files changed, 27 insertions, 23 deletions
diff --git a/src/process.c b/src/process.c
index fd34eb08d9d..2c66b9e976e 100644
--- a/src/process.c
+++ b/src/process.c
@@ -134,6 +134,29 @@ extern int sys_select (int, fd_set *, fd_set *, fd_set *,
134 struct timespec *, void *); 134 struct timespec *, void *);
135#endif 135#endif
136 136
137/* Work around GCC 4.7.0 bug with strict overflow checking; see
138 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52904>.
139 These lines can be removed once the GCC bug is fixed. */
140#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
141# pragma GCC diagnostic ignored "-Wstrict-overflow"
142#endif
143
144Lisp_Object Qeuid, Qegid, Qcomm, Qstate, Qppid, Qpgrp, Qsess, Qttname, Qtpgid;
145Lisp_Object Qminflt, Qmajflt, Qcminflt, Qcmajflt, Qutime, Qstime, Qcstime;
146Lisp_Object Qcutime, Qpri, Qnice, Qthcount, Qstart, Qvsize, Qrss, Qargs;
147Lisp_Object Quser, Qgroup, Qetime, Qpcpu, Qpmem, Qtime, Qctime;
148Lisp_Object QCname, QCtype;
149
150/* True if keyboard input is on hold, zero otherwise. */
151
152static bool kbd_is_on_hold;
153
154/* Nonzero means don't run process sentinels. This is used
155 when exiting. */
156bool inhibit_sentinels;
157
158#ifdef subprocesses
159
137#ifndef SOCK_CLOEXEC 160#ifndef SOCK_CLOEXEC
138# define SOCK_CLOEXEC 0 161# define SOCK_CLOEXEC 0
139#endif 162#endif
@@ -165,29 +188,6 @@ process_socket (int domain, int type, int protocol)
165# define socket(domain, type, protocol) process_socket (domain, type, protocol) 188# define socket(domain, type, protocol) process_socket (domain, type, protocol)
166#endif 189#endif
167 190
168/* Work around GCC 4.7.0 bug with strict overflow checking; see
169 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52904>.
170 These lines can be removed once the GCC bug is fixed. */
171#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
172# pragma GCC diagnostic ignored "-Wstrict-overflow"
173#endif
174
175Lisp_Object Qeuid, Qegid, Qcomm, Qstate, Qppid, Qpgrp, Qsess, Qttname, Qtpgid;
176Lisp_Object Qminflt, Qmajflt, Qcminflt, Qcmajflt, Qutime, Qstime, Qcstime;
177Lisp_Object Qcutime, Qpri, Qnice, Qthcount, Qstart, Qvsize, Qrss, Qargs;
178Lisp_Object Quser, Qgroup, Qetime, Qpcpu, Qpmem, Qtime, Qctime;
179Lisp_Object QCname, QCtype;
180
181/* True if keyboard input is on hold, zero otherwise. */
182
183static bool kbd_is_on_hold;
184
185/* Nonzero means don't run process sentinels. This is used
186 when exiting. */
187bool inhibit_sentinels;
188
189#ifdef subprocesses
190
191Lisp_Object Qprocessp; 191Lisp_Object Qprocessp;
192static Lisp_Object Qrun, Qstop, Qsignal; 192static Lisp_Object Qrun, Qstop, Qsignal;
193static Lisp_Object Qopen, Qclosed, Qconnect, Qfailed, Qlisten; 193static Lisp_Object Qopen, Qclosed, Qconnect, Qfailed, Qlisten;
@@ -7058,6 +7058,7 @@ integer or floating point values.
7058 return system_process_attributes (pid); 7058 return system_process_attributes (pid);
7059} 7059}
7060 7060
7061#ifdef subprocesses
7061/* Arrange to catch SIGCHLD if this hasn't already been arranged. 7062/* Arrange to catch SIGCHLD if this hasn't already been arranged.
7062 Invoke this after init_process_emacs, and after glib and/or GNUstep 7063 Invoke this after init_process_emacs, and after glib and/or GNUstep
7063 futz with the SIGCHLD handler, but before Emacs forks any children. 7064 futz with the SIGCHLD handler, but before Emacs forks any children.
@@ -7082,6 +7083,7 @@ catch_child_signal (void)
7082 : old_action.sa_handler); 7083 : old_action.sa_handler);
7083 unblock_child_signal (); 7084 unblock_child_signal ();
7084} 7085}
7086#endif /* subprocesses */
7085 7087
7086 7088
7087/* This is not called "init_process" because that is the name of a 7089/* This is not called "init_process" because that is the name of a
@@ -7288,10 +7290,12 @@ syms_of_process (void)
7288 DEFSYM (Qcutime, "cutime"); 7290 DEFSYM (Qcutime, "cutime");
7289 DEFSYM (Qcstime, "cstime"); 7291 DEFSYM (Qcstime, "cstime");
7290 DEFSYM (Qctime, "ctime"); 7292 DEFSYM (Qctime, "ctime");
7293#ifdef subprocesses
7291 DEFSYM (Qinternal_default_process_sentinel, 7294 DEFSYM (Qinternal_default_process_sentinel,
7292 "internal-default-process-sentinel"); 7295 "internal-default-process-sentinel");
7293 DEFSYM (Qinternal_default_process_filter, 7296 DEFSYM (Qinternal_default_process_filter,
7294 "internal-default-process-filter"); 7297 "internal-default-process-filter");
7298#endif
7295 DEFSYM (Qpri, "pri"); 7299 DEFSYM (Qpri, "pri");
7296 DEFSYM (Qnice, "nice"); 7300 DEFSYM (Qnice, "nice");
7297 DEFSYM (Qthcount, "thcount"); 7301 DEFSYM (Qthcount, "thcount");