This is the mail archive of the cygwin mailing list for the Cygwin 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: optimizing fork/exec in vendor source


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Jack Andrews on 10/9/2008 11:25 PM:
> in the example, i guess all that is done is to fork and exec ls,
> grabbing its stdout.  this can be done with CreateProcess() easily
> without having to emulate everything that fork does.  so my real
> question is, has anyone tried optimizing fork/exec to CreateProcess()?

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, at which
point, bash should be patched to take advantage of it, at least when
exec'ing subprocesses (it won't help the other common case where bash
truly must fork, such as in creating subshells, but might speed up the
execution of child processes).

>  and would the maintainers of (eg. bash) accept a patch for use with
> cygwin?  (so i wouldn't have to continually forward port my fork/exec
> code).

You are welcome to post whatever patch you'd like.  But in the case of
bash, if the patch uses native Windows calls, I'm very unlikely to either
apply it or to pass it upstream, as it would just be a maintenance
nightmare, not to mention too risky of breaking posix semantics by going
behind cygwin's back.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@byu.net
volunteer cygwin bash maintainer
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkjvSLIACgkQ84KuGfSFAYBYLwCfQgLOwpuMvvxODEhTBQmDlbiW
wK0AoIqgLSaFj4vF6QM1ieKA/73Xlt8N
=ipVN
-----END PGP SIGNATURE-----

--
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/


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