mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
libast: fix exec fail on interactive (Solaris patch 315-26773587)
This upstreams a Solaris patch: https://github.com/oracle/solaris-userland/blob/master/components/ksh93/patches/315-26773587.patch which ostensibly fixes this bug filed in Oracle's closed system: 26773587 interactive ksh exec failure in while read loop src/lib/libast/comp/spawnveg.c: - If posix_spawn(3) fails with an error other than EPERM, retry, but without attributes.
This commit is contained in:
parent
4e67234ae8
commit
7d2bb8fdd9
1 changed files with 4 additions and 1 deletions
|
@ -63,7 +63,10 @@ spawnveg(const char* path, char* const argv[], char* const envv[], pid_t pgid)
|
||||||
goto bad;
|
goto bad;
|
||||||
}
|
}
|
||||||
if (err = posix_spawn(&pid, path, NiL, &attr, argv, envv ? envv : environ))
|
if (err = posix_spawn(&pid, path, NiL, &attr, argv, envv ? envv : environ))
|
||||||
goto bad;
|
{
|
||||||
|
if ((err != EPERM) || (err = posix_spawn(&pid, path, NiL, NiL, argv, envv ? envv : environ)))
|
||||||
|
goto bad;
|
||||||
|
}
|
||||||
posix_spawnattr_destroy(&attr);
|
posix_spawnattr_destroy(&attr);
|
||||||
#if _lib_posix_spawn < 2
|
#if _lib_posix_spawn < 2
|
||||||
if (waitpid(pid, &err, WNOHANG|WNOWAIT) == pid && EXIT_STATUS(err) == 127)
|
if (waitpid(pid, &err, WNOHANG|WNOWAIT) == pid && EXIT_STATUS(err) == 127)
|
||||||
|
|
Loading…
Reference in a new issue