-#ifdef __APPLE__
- if (_vprocmgr_move_subset_to_user(geteuid(), "Background") != NULL)
- err(EXIT_MISC, "can't migrate to background session");
+#if defined(__APPLE__) && !TARGET_OS_EMBEDDED
+ if (_vprocmgr_detach_from_console(0) != NULL)
+ err(EXIT_MISC, "can't detach from console");