Loading...
sys/posix_spawn.c Libc-1725.40.4 Libc-1725.0.11
--- Libc/Libc-1725.40.4/sys/posix_spawn.c
+++ Libc/Libc-1725.0.11/sys/posix_spawn.c
@@ -194,13 +194,8 @@
 	}
 	if (eacces)
 		err = EACCES;
-	/*
-	 * Preserve errno from posix_spawn(3) if it wasn't a PATH search, or
-	 * if it was a PATH search and we bailed out early.  Note that every
-	 * branch in the loop jumps to the `done` label to preserve errno, so
-	 * this is more of a defensive check.
-	 */
-	else if (env_path != NULL && op == NULL)
+	/* Preserve errno from posix_spawn(3) if it wasn't a PATH search. */
+	else if (env_path != NULL)
 		err = ENOENT;
 done:
 	return (err);