int fderr = FD_STDERR;
pid_t pid;
int r;
-#if USE_POSIX_SPAWN
+#if defined(USE_POSIX_SPAWN)
short flags = 0;
posix_spawnattr_t attr;
posix_spawn_file_actions_t fa;
#else /* use posix_spawn() */
- pid = -1;
-
if ((r = posix_spawnattr_init (&attr)) != 0)
goto done;
cleanup:
posix_spawn_file_actions_destroy (&fa);
posix_spawnattr_destroy (&attr);
-#endif /* have posix_spawn() */
done:
+ if (r != 0)
+ pid = -1;
+
+#endif /* have posix_spawn() */
+
if (pid < 0)
OSS (error, NILF, "%s: %s", argv[0], strerror (r));