diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index 705bdc7bf36..bbeb20eb154 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -589,6 +589,15 @@ class URandomTests(unittest.TestCase): class ExecTests(unittest.TestCase): def test_execvpe_with_bad_program(self): + try: + # 'linuxthreads-0.10' or 'NPTL 2.10.2' + pthread = os.confstr("CS_GNU_LIBPTHREAD_VERSION") + linuxthreads = pthread.startswith("linuxthreads") + except ValueError: + linuxthreads = False + if linuxthreads: + raise unittest.SkipTest( + "avoid linuxthreads bug: see issue #4970") self.assertRaises(OSError, os.execvpe, 'no such app-', ['no such app-'], None) def test_execvpe_with_bad_arglist(self): diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index fb22eb6bece..7ba7b26078b 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -6127,6 +6127,12 @@ static struct constdef posix_constants_confstr[] = { #ifdef _MIPS_CS_VENDOR {"MIPS_CS_VENDOR", _MIPS_CS_VENDOR}, #endif +#ifdef _CS_GNU_LIBC_VERSION + {"CS_GNU_LIBC_VERSION", _CS_GNU_LIBC_VERSION}, +#endif +#ifdef _CS_GNU_LIBPTHREAD_VERSION + {"CS_GNU_LIBPTHREAD_VERSION", _CS_GNU_LIBPTHREAD_VERSION}, +#endif }; static int