is there a way to change the target of symlink /proc/self/exe?
hi all: recently i'm working on make checkpoint on linux process and encountered a problem,it looks like that when i munmap mem开发者_如何学Cory map of the executable to current process,the symlink /proc/self/exe is dead.what i want is to make this symlink pointing to a other executable(the one for my resumed processs),is that possible?i tried delete it and recreate, permission denied. english is not my native language, i hope i've made my point,thanx
prctl(PR_SET_MM_EXE_FILE, ...) Supersede the /proc/pid/exe symbolic link with a new one pointing to a new executable file identified by the file descriptor provided in arg3 argument. The file descriptor should be obtained with a regular open(2) call.
No. /proc
is completely managed by the kernel and does not allow changes like that.
But you may be able to start a new process (with fork()
perhaps) and map your memory snapshot into that.
精彩评论