diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2014-08-29 16:31:59 +0200 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2014-08-29 16:31:59 +0200 |
commit | affccb4da7a3eea42bb7941044961aa2acb8a0f9 (patch) | |
tree | 533ec0b1c669daade3c8987f13567d251dc6ee9e /Python/pythonrun.c | |
parent | 6aaa574410a548108d521372d30a2427394a7793 (diff) | |
download | cpython-affccb4da7a3eea42bb7941044961aa2acb8a0f9.tar.gz |
Issue #22043: _PyTime_Init() now checks if the system clock works.
Other changes:
* The whole _PyTime API is private (not defined if Py_LIMITED_API is set)
* _PyTime_gettimeofday_info() also returns -1 on error
* Simplify PyTime_gettimeofday(): only use clock_gettime(CLOCK_REALTIME) or
gettimeofday() on UNIX. Don't fallback to ftime() or time() anymore.
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r-- | Python/pythonrun.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 63d9eeb689..bac39c23b4 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -452,7 +452,8 @@ _Py_InitializeEx_Private(int install_sigs, int install_importlib) if (_PyFaulthandler_Init()) Py_FatalError("Py_Initialize: can't initialize faulthandler"); - _PyTime_Init(); + if (_PyTime_Init() < 0) + Py_FatalError("Py_Initialize: can't initialize time"); if (initfsencoding(interp) < 0) Py_FatalError("Py_Initialize: unable to load the file system codec"); |