X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fvcontext.c;h=1e23637cf4814cfdcf457b3df460299042ad356b;hb=148ab3024621f97b9cf95091657db2448098bc66;hp=57a45fe06fc7e1f7b51672fa2eccbdd5f2a08134;hpb=2fbc46a92318904f1414f1aeaf256970e80e845a;p=util-vserver.git diff --git a/src/vcontext.c b/src/vcontext.c index 57a45fe..1e23637 100644 --- a/src/vcontext.c +++ b/src/vcontext.c @@ -21,6 +21,7 @@ #endif #include "util.h" +#include "compat-pivot_root.h" #include "lib/internal.h" #include "lib_internal/jail.h" #include "lib_internal/sys_personality.h" @@ -367,6 +368,10 @@ doit(struct Arguments const *args, int argc, char *argv[]) doExternalSync(ext_sync_fd, args->sync_msg); doSyncStage1(p, args->do_disconnect); DPRINTF("doit: pid=%u, ppid=%u\n", getpid(), getppid()); + + if (args->do_migrateself) + setsid(); + if (!args->do_vlogin) execvp (argv[optind],argv+optind); else