aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
authorPaul Eggert2014-04-16 12:43:46 -0700
committerPaul Eggert2014-04-16 12:43:46 -0700
commit290d7ac277986bd118e594a8100b3f40e4492cb1 (patch)
treed63a3aa61cac577dd119665edaffe2def8d194e2 /src/process.c
parent37eccff4f72c5a36dcd4b89d417b0047aab84e50 (diff)
parentb262bde327db2cd9b2f01f2d3ed946d0b188cb9d (diff)
downloademacs-290d7ac277986bd118e594a8100b3f40e4492cb1.tar.gz
emacs-290d7ac277986bd118e594a8100b3f40e4492cb1.zip
Merge from emacs-24; up to 2014-04-16T15:28:26Z!monnier@iro.umontreal.ca
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 5a5ce0ce674..fdb0501f9ec 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;
@@ -7059,6 +7059,7 @@ integer or floating point values.
7059 return system_process_attributes (pid); 7059 return system_process_attributes (pid);
7060} 7060}
7061 7061
7062#ifdef subprocesses
7062/* Arrange to catch SIGCHLD if this hasn't already been arranged. 7063/* Arrange to catch SIGCHLD if this hasn't already been arranged.
7063 Invoke this after init_process_emacs, and after glib and/or GNUstep 7064 Invoke this after init_process_emacs, and after glib and/or GNUstep
7064 futz with the SIGCHLD handler, but before Emacs forks any children. 7065 futz with the SIGCHLD handler, but before Emacs forks any children.
@@ -7084,6 +7085,7 @@ catch_child_signal (void)
7084 : old_action.sa_handler); 7085 : old_action.sa_handler);
7085 unblock_child_signal (&oldset); 7086 unblock_child_signal (&oldset);
7086} 7087}
7088#endif /* subprocesses */
7087 7089
7088 7090
7089/* This is not called "init_process" because that is the name of a 7091/* This is not called "init_process" because that is the name of a
@@ -7290,10 +7292,12 @@ syms_of_process (void)
7290 DEFSYM (Qcutime, "cutime"); 7292 DEFSYM (Qcutime, "cutime");
7291 DEFSYM (Qcstime, "cstime"); 7293 DEFSYM (Qcstime, "cstime");
7292 DEFSYM (Qctime, "ctime"); 7294 DEFSYM (Qctime, "ctime");
7295#ifdef subprocesses
7293 DEFSYM (Qinternal_default_process_sentinel, 7296 DEFSYM (Qinternal_default_process_sentinel,
7294 "internal-default-process-sentinel"); 7297 "internal-default-process-sentinel");
7295 DEFSYM (Qinternal_default_process_filter, 7298 DEFSYM (Qinternal_default_process_filter,
7296 "internal-default-process-filter"); 7299 "internal-default-process-filter");
7300#endif
7297 DEFSYM (Qpri, "pri"); 7301 DEFSYM (Qpri, "pri");
7298 DEFSYM (Qnice, "nice"); 7302 DEFSYM (Qnice, "nice");
7299 DEFSYM (Qthcount, "thcount"); 7303 DEFSYM (Qthcount, "thcount");