Mail Archives: cygwin/2008/10/10/10:08:18
Jack Andrews <effbiae <at> gmail.com> writes:
>
> eric wrote:
> > No, changing bash to use CreateProcess is not the answer. The real
> > question is whether someone with copyright assignment is willing to write
> > posix_spawn[p], and write it more efficiently than forking,
>
> this seems to be an easy problem in cygwin (at least, in comparison to fork).
Not so fast. Yes, it is easy to write posix_spawn on top of fork; gnulib has
done just that:
http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=shortlog;h=12d62c3
But what is not easy is writing posix_spawn without using fork, in order to
optimize by using the Windows notion of spawning processes, but while still
maintaining all other POSIX semantics that cygwin processes need. In other
words, gnulib's solution, while it works for cygwin, is no better than fork.
cgf has already commented on this list (and in fact, even Linus Torvalds has
mentioned it on the git list) about the potential for speedups with a proper
posix_spawn, and the difficulty of getting there:
http://sourceware.org/ml/cygwin/2006-11/msg00380.html
You're also forgetting that patching bash to use posix_spawn, while useful in
its own right, is not trivial (the upstream bash maintainer will probably
accept such a patch only if it has sane fallbacks onto a fork implementation
for other systems that lack posix_spawn, but he doesn't use gnulib, nor does he
post his development repository publicly).
> who has to hold the copyright?
http://cygwin.com/contrib.html
http://cygwin.com/assign.txt
--
Eric Blake
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -