]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
Merge branch 'sys-utils-unshare-pdeathsig-race' of https://github.com/earlchew/util...
authorKarel Zak <kzak@redhat.com>
Tue, 11 Jan 2022 12:55:30 +0000 (13:55 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 11 Jan 2022 12:55:30 +0000 (13:55 +0100)
* 'sys-utils-unshare-pdeathsig-race' of https://github.com/earlchew/util-linux:
  unshare: Fix PDEATHSIG race for --kill-child

1  2 
sys-utils/unshare.c

index 70dead1b6d4be513e4a4c7760a5e762509f8881c,2dbab9161a40b33f4fa746050590f3cfb06b013a..443358952ba0b1775f988f1ce0202472bab02f26
@@@ -763,9 -763,8 +763,9 @@@ int main(int argc, char *argv[]
        const char *newroot = NULL;
        const char *newdir = NULL;
        pid_t pid_bind = 0, pid_idmap = 0;
-       pid_t pid = 0;
+       pid_t pid = 0, pid_parent = 0;
        int fd_idmap, fd_bind = -1;
 +      sigset_t sigset, oldsigset;
        int status;
        unsigned long propagation = UNSHARE_PROPAGATION_DEFAULT;
        int force_uid = 0, force_gid = 0;