This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: posix_spawn(): errno in older glibc versions


* Felipe Gasper:

> The clone()d process (which is a CLONE_VFORK) also, per strace, does a
> whole mess of signal-setting prior to the execve(). This also appears
> to violate vfork()’s documentation.

How so?

> Also, at least on the Ubuntu box, posix_spawn()’s man page appears to
> be incorrect:
>
> -----
>        The  posix_spawn()  and  posix_spawnp() functions fail only in the case
>        where the underlying fork(2) or vfork(2) call fails;  in  these  cases,
>        these functions return an error number, which will be one of the errors
>        described for fork(2) or vfork(2).
> -----
>
> From what I see, the clone() clearly succeeds, but it’s the exec’s
> success/failure that posix_spawn() reports. This is much more useful
> behavior, IMO--does that just need to make its way into the man page?

Well, there is the matter of the emulations, where you do not actually
get a report of the execve error.  I'm not sure to what extent the
man-pages project intends to cover those.

Thanks,
Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]