##// END OF EJS Templates
dispatch: ignore further SIGPIPE while handling KeyboardInterrupt...
dispatch: ignore further SIGPIPE while handling KeyboardInterrupt I got the following error by running "hg log" and quitting the pager immediately. Any output here may trigger another SIGPIPE, so only thing we can do is to swallow the exception and exit with an error status. Traceback (most recent call last): File "./hg", line 45, in <module> mercurial.dispatch.run() File "mercurial/dispatch.py", line 83, in run status = (dispatch(req) or 0) & 255 File "mercurial/dispatch.py", line 167, in dispatch req.ui.warn(_("interrupted!\n")) File "mercurial/ui.py", line 1224, in warn self.write_err(*msg, **opts) File "mercurial/ui.py", line 790, in write_err self._write_err(*msgs, **opts) File "mercurial/ui.py", line 798, in _write_err self.ferr.write(a) File "mercurial/ui.py", line 129, in _catchterm raise error.SignalInterrupt mercurial.error.SignalInterrupt Perhaps this wasn't visible before de5c9d0e02ea because the original stderr handle was restored very late.

File last commit:

r30112:9b6ff0f9 default
r32044:cde72a19 default
Show More
util.h
45 lines | 981 B | text/x-c | CLexer
Renato Cunha
util.h: Utility macros for handling different Python APIs....
r11358 /*
util.h - utility functions for interfacing with the various python APIs.
This software may be used and distributed according to the terms of
the GNU General Public License, incorporated herein by reference.
*/
#ifndef _HG_UTIL_H_
#define _HG_UTIL_H_
Maciej Fijalkowski
internals: move the bitmanipulation routines into its own file...
r29444 #include "compat.h"
Renato Cunha
util.h: Utility macros for handling different Python APIs....
r11358 #if PY_MAJOR_VERSION >= 3
#define IS_PY3K
Gregory Szorc
parsers: move PyInt aliasing out of util.h...
r30112 #endif
Renato Cunha
util.h: Utility macros for handling different Python APIs....
r11358
Siddharth Agarwal
parsers: inline fields of dirstate values in C version...
r21809 typedef struct {
PyObject_HEAD
char state;
int mode;
int size;
int mtime;
} dirstateTupleObject;
André Sintzoff
util.h: declare dirstateTupleType variable instead of defining it...
r21838 extern PyTypeObject dirstateTupleType;
Siddharth Agarwal
parsers: inline fields of dirstate values in C version...
r21809 #define dirstate_tuple_check(op) (Py_TYPE(op) == &dirstateTupleType)
Siddharth Agarwal
util.h: define an enum for normcase specs...
r24608 /* This should be kept in sync with normcasespecs in encoding.py. */
enum normcase_spec {
NORMCASE_LOWER = -1,
NORMCASE_UPPER = 1,
NORMCASE_OTHER = 0
};
Laurent Charignon
phase: compute phases in C...
r24443 #define MIN(a, b) (((a)<(b))?(a):(b))
Matt Mackall
manifest: move C bool polyfill into util.h
r24442 /* VC9 doesn't include bool and lacks stdbool.h based on my searching */
Kevin Bullock
util: fix the check for non-C99 compilers (issue4605)
r24829 #if defined(_MSC_VER) || __STDC_VERSION__ < 199901L
Matt Mackall
manifest: move C bool polyfill into util.h
r24442 #define true 1
#define false 0
typedef unsigned char bool;
#else
#include <stdbool.h>
#endif
Renato Cunha
util.h: Utility macros for handling different Python APIs....
r11358 #endif /* _HG_UTIL_H_ */