From ff6f7c4d82e5780cced4900561eaae2af0a24d06 Mon Sep 17 00:00:00 2001 From: Juho Snellman Date: Sun, 13 Nov 2005 05:10:46 +0000 Subject: [PATCH] 0.9.6.39: Yet another personality() change. Some older kernels (original report was on 2.6.4) apparently strip unknown personality flags on exec(), leading to an eternal execve() loop at startup. So only do the re-exec dance on 2.6.11 and newer. --- src/runtime/linux-os.c | 9 ++++++++- version.lisp-expr | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/runtime/linux-os.c b/src/runtime/linux-os.c index 85221c5..d0aa95a 100644 --- a/src/runtime/linux-os.c +++ b/src/runtime/linux-os.c @@ -124,12 +124,15 @@ os_init(char *argv[], char *envp[]) struct utsname name; int major_version; int minor_version; + int patch_version; char *p; uname(&name); p=name.release; major_version = atoi(p); p=strchr(p,'.')+1; minor_version = atoi(p); + p=strchr(p,'.')+1; + patch_version = atoi(p); if (major_version<2) { lose("linux kernel version too old: major version=%d (can't run in version < 2.0.0)", major_version); @@ -161,7 +164,11 @@ Please use a more recent kernel or a version of SBCL without threading support.\ * don't do this trick on other platforms. */ #ifdef LISP_FEATURE_X86 - if ((major_version == 2 && minor_version >= 6) + if ((major_version == 2 + /* Some old kernels will apparently lose unsupported personality flags + * on exec() */ + && ((minor_version == 6 && patch_version >= 11) + || (minor_version > 6))) || major_version >= 3) { int pers = personality(0xffffffffUL); diff --git a/version.lisp-expr b/version.lisp-expr index f2961b1..c140bf1 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.9.6.38" +"0.9.6.39" -- 1.7.10.4