cygwin's fork Re: [wine-devel] Re: Bug 24018 which appears to be a ... for running Cygwin on Wine

Hin-Tak Leung hintak_leung at yahoo.co.uk
Mon Jul 1 18:40:42 CDT 2013


--- On Mon, 1/7/13, David Laight <david at l8s.co.uk> wrote:

> On Mon, Jul 01, 2013 at 06:13:26PM
> +0200, Peter Rosin wrote:
> > 
> > I would like to point out that it seems that the
> current bug does not
> > appear to be *in* setup.exe, but rather occurs when
> setup.exe runs
> > a bash post-install script, where the bash.exe that
> interprets the
> > script depends on cygwin1.dll. If my analysis is
> correct, the bug
> > would occur also when duplicating the actions of
> setup.exe manually.
> 
> If you read into what cygwin does when trying to emulate
> fork() it
> is surprising it works at all!
> 
> Putting some effort into getting the shell (be it bash or an
> ash derivative)
> and gmake to use posix_spawn() instead of fork() and adding
> posix_spawn()
> to cygwin (for which patches are avaiable) would speed up
> cygwin no end
> and probably avoid  some of these bugs (and the random
> fork failed errors).
> 
> One day I'll get annoyed at some issues with cygwin and
> start fixing them!
> (Like getting ^C to work for windows console programs in
> mintty windows.)

Yap. It is fork/exec, the whole thing around process ids, and stat, inode emulation, as well.
It is just not setup.exe - post-install scripts are per-package items and some packages don't have them.

That has been hinted at a few times by the cygwin developers who answered and me. It is "easier" to see what the problem is (or "what the problems are"), by manually unpacking the installing packages and running the scripts by hand - as the cygwin developers had already suggested. And it is even "easier" by-passing it, if one just wants a cygwin installation to play with, by copying from a windows box.

Being able to get through installation, or obtaining an installation, does not change the fact that there are fundamental technical reasons that some part of cygwin does not work well in wine. Not without some serial rewrite in cygwin *and* wine.

cygwin did run on win98 . I used cygwin on win98 regularly then. posix_spawn() wasn't available on the 95/98/ME family. 

Since cygwin works well enough on genuine windows (..more or less...), that it can be improved/rewritten does not say the issues are less of a wine problem.





More information about the wine-devel mailing list