  		case 'U':
  			if (optarg)
  				open_namespace_fd(CLONE_NEWUSER, optarg);
-@@ -420,7 +435,7 @@ int main(int argc, char *argv[])
+@@ -427,7 +442,7 @@ int main(int argc, char *argv[])
  				continue;
  			if (nsfile->nstype == CLONE_NEWPID && do_fork == -1)
  				do_fork = 1;

 		if ((ret == child) && (WIFSTOPPED(status))) {
 			/* The child suspended so suspend us as well */
 			kill(getpid(), SIGSTOP);
@@ -218,6 +229,7 @@ int main(int argc, char *argv[])
 		{ "ipc", optional_argument, NULL, 'i' },
 		{ "net", optional_argument, NULL, 'n' },
 		{ "pid", optional_argument, NULL, 'p' },
+		{ "parent", no_argument, NULL, 'P' },
 		{ "user", optional_argument, NULL, 'U' },
 		{ "cgroup", optional_argument, NULL, 'C' },
 		{ "setuid", required_argument, NULL, 'S' },
@@ -249,7 +261,7 @@ int main(int argc, char *argv[])
 	atexit(close_stdout);
 
 	while ((c =
-		getopt_long(argc, argv, "+ahVt:m::u::i::n::p::C::U::S:G:r::w::FZ",
+		getopt_long(argc, argv, "+ahVt:m::u::i::n::Pp::C::U::S:G:r::w::FZ",
 			    longopts, NULL)) != -1) {
 		switch (c) {
 		case 'h':
@@ -300,6 +312,9 @@ int main(int argc, char *argv[])
 			else
 				namespaces |= CLONE_NEWCGROUP;
 			break;

 
 static void open_target_fd(int *fd, const char *type, const char *path)
 {
@@ -186,7 +188,16 @@ static void continue_as_child(void)
 		return;
 
 	for (;;) {
