]> git.wh0rd.org - home.git/blobdiff - vunshare.c
git-rewrite-authors: add sanity check for missing authors file
[home.git] / vunshare.c
index 5984f0765f9297c007415043cd2977c68a37b88d..274eebcd9dc87e05008d3f57ff780012b1b2fb90 100644 (file)
@@ -7,6 +7,8 @@
  * - Add userns support.
  * - Make pidns init optional.
  * - Make setproctitle nicer and include program argv[0].
+ * - Set up prctl(PR_SET_PDEATHSIG).
+ * - Set up prctl(PR_SET_CHILD_SUBREAPER).
  */
 
 #define _GNU_SOURCE
@@ -60,6 +62,8 @@ static void unshare_net(void)
        ifr.ifr_flags |= IFF_UP | IFF_RUNNING;
        if (ioctl(sock, SIOCSIFFLAGS, &ifr) < 0)
                err(1, "ioctl(SIOCSIFFLAGS) failed");
+
+       close(sock);
 }
 
 static char **title_argv;