posix: Fix default posix_spawn return value
commitdb6b2f25220f1cf345656164211fd549c22189dd
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 29 Jun 2017 15:05:01 +0000 (29 12:05 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 5 Jul 2017 18:58:31 +0000 (5 15:58 -0300)
treea34b0738381ebc3c51842770b579266abe59bff2
parentb8e0e03b7c452923df96e45ccbae60f8a9f4f684
posix: Fix default posix_spawn return value

This patch fix the return value for error conditions for default
posix_spawn (where the errno is expected).  It also avoid clobber
errno on fork call.

Checked on x86_64 (with Linux implementation removed).

[BZ# 21697]
* sysdeps/posix/spawni.c (__spawni_child): Fix return value.
(__spawnix): Do not clober errno.
ChangeLog
sysdeps/posix/spawni.c