X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Frpm-fake.c;h=b0ce156ebcd511526af5a1a8d16a66ec9f3b32f7;hb=90ceb7b399cf3c1eb8d0c7474bd2498fe62cd022;hp=380bf0722283ee5716445b03c68b34dbf43c0bc3;hpb=eea3d83e4d401f0a214721bf0438a484cbe5dd68;p=util-vserver.git diff --git a/src/rpm-fake.c b/src/rpm-fake.c index 380bf07..b0ce156 100644 --- a/src/rpm-fake.c +++ b/src/rpm-fake.c @@ -245,9 +245,9 @@ setupContext(xid_t xid, char const **xid_str) xid_t rc=VC_NOCTX; if ((xid==VC_DYNAMIC_XID || !vc_is_dynamic_xid(xid)) && - (rc=vc_ctx_create(xid))==VC_NOCTX && + (rc=vc_ctx_create(xid, NULL))==VC_NOCTX && errno!=EEXIST) { - perror(ENSC_WRAPPERS_PREFIX "vc_create_context()"); + perror(ENSC_WRAPPERS_PREFIX "vc_ctx_create()"); exit(255); } @@ -510,6 +510,8 @@ exitRPMFake() uint8_t c; if (read(sync_sock, &c, 1)!=1) { /*...*/ } if (write(pw_sock, "Q", 1)!=1) { /*...*/ } + /* sync_sock should return EOF when the resolver exits... */ + if (read(sync_sock, &c, 1)!=0) { /*...*/ } } } @@ -595,7 +597,7 @@ execvWorker(char const *path, char * const argv[], char * const envp[]) int res = -1; if (vc_isSupported(vcFEATURE_MIGRATE)) - res = vc_ctx_migrate(ctx); + res = vc_ctx_migrate(ctx, 0); else { #ifdef VC_ENABLE_API_COMPAT res = vc_new_s_context(ctx,caps,flags);