projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gencgc: More precise conservatism for pointers to boxed pages.
[sbcl.git]
/
src
/
runtime
/
linux-os.c
diff --git
a/src/runtime/linux-os.c
b/src/runtime/linux-os.c
index
b7ceca1
..
a23bc5d
100644
(file)
--- a/
src/runtime/linux-os.c
+++ b/
src/runtime/linux-os.c
@@
-273,7
+273,9
@@
os_init(char *argv[], char *envp[])
* in an error or if the value didn't change. Otherwise
* this might result in an infinite loop.
*/
* in an error or if the value didn't change. Otherwise
* this might result in an infinite loop.
*/
- if (retval != -1 && newpers != pers) {
+
+ if (!getenv("SBCL_IS_RESTARTING") &&
+ retval != -1 && newpers != pers) {
/* Use /proc/self/exe instead of trying to figure out
* the executable path from PATH and argv[0], since
* that's unreliable. We follow the symlink instead of
/* Use /proc/self/exe instead of trying to figure out
* the executable path from PATH and argv[0], since
* that's unreliable. We follow the symlink instead of
@@
-282,15
+284,21
@@
os_init(char *argv[], char *envp[])
char runtime[PATH_MAX+1];
int i = readlink("/proc/self/exe", runtime, PATH_MAX);
if (i != -1) {
char runtime[PATH_MAX+1];
int i = readlink("/proc/self/exe", runtime, PATH_MAX);
if (i != -1) {
+ environ = envp;
+ setenv("SBCL_IS_RESTARTING", "T", 1);
runtime[i] = '\0';
runtime[i] = '\0';
- execve(runtime, argv, envp);
+ execv(runtime, argv);
}
}
/* Either changing the personality or execve() failed. Either
* way we might as well continue, and hope that the random
* memory maps are ok this time around.
*/
}
}
/* Either changing the personality or execve() failed. Either
* way we might as well continue, and hope that the random
* memory maps are ok this time around.
*/
- fprintf(stderr, "WARNING: Couldn't re-execute SBCL with the proper personality flags (maybe /proc isn't mounted?). Trying to continue anyway.\n");
+ fprintf(stderr, "WARNING:\
+\nCouldn't re-execute SBCL with proper personality flags (/proc isn't mounted? setuid?)\
+\nTrying to continue anyway.\n");
+ } else {
+ unsetenv("SBCL_IS_RESTARTING");
}
}
#ifdef LISP_FEATURE_X86
}
}
#ifdef LISP_FEATURE_X86