]> git.saurik.com Git - apple/shell_cmds.git/blobdiff - nohup/nohup.c
shell_cmds-216.40.4.tar.gz
[apple/shell_cmds.git] / nohup / nohup.c
index 4262680f9ae42bb613514c64759d2fab0433cae9..021361c5cf251c00c3c5c146e369c727bad17982 100644 (file)
@@ -57,6 +57,7 @@ __FBSDID("$FreeBSD: src/usr.bin/nohup/nohup.c,v 1.10 2003/05/03 19:44:46 obrien
 #include <unistd.h>
 
 #ifdef __APPLE__
+#include <TargetConditionals.h>
 #include <vproc.h>
 #include <vproc_priv.h>
 #endif
@@ -94,7 +95,7 @@ main(int argc, char *argv[])
 
        (void)signal(SIGHUP, SIG_IGN);
 
-#ifdef __APPLE__
+#if defined(__APPLE__) && !(TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR)
        if (_vprocmgr_detach_from_console(0) != NULL)
                err(EXIT_MISC, "can't detach from console");
 #endif