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: Failure with fork()

On 2013-06-27 15:56-0500 Yaakov (Cygwin/X) wrote:

On 2013-06-27 15:33, Alan W. Irwin wrote:
I think you keep assuming I have some version of Cygwin already
installed when that is not the case.  It is the last stage of the
initial attempt at installation using setup.exe that fails on Wine due
to the fork bug. Furthermore, when I download setup.exe from it contains the fork bug. That version is
self-contained, i.e., only setup.exe needs to be downloaded, not
cygwin1.dll in addition.  I presume that is because setup.exe uses a
static version of the cygwin library as a matter of convenience rather
than depending on an external cygwin1.dll that could be separately

There is no such thing as static linkage of Cygwin. setup.exe is in fact a native Windows (MinGW) executable, due to the fact that it needs to be able to run before Cygwin is installed, or while upgrading cygwin1.dll.

Therefore, if you are seeing fork() errors when running setup, they are actually coming from the postinstall scripts which are run after installing files. In that case, the best solution may be something along the lines of (untested):

1) Open the Wine equivalent of taskmgr.exe.
2) Run setup.exe again and install just the Base packages.
3) During postinstall, kill any bash.exe processes ASAP.
4) setup.exe should list some postinstall errors before completion, which can be ignored for now. 5) After setup.exe is finished, replace C:\cygwin\bin\cygwin1.dll with the latest snapshot DLL. 6) Run setup.exe again with the same options; the postinstall scripts should (in theory) run properly this time.
7) Launch Cygwin Terminal once to set up your environment.
8) Run setup.exe one more time to install additional packages.

Once the relevant snapshot is released I will let you know how far I
get with a variant of the above I have thought of which is replacing
cygwin1.dll on the fly when the individual step of the initial run of
setup.exe that installs cygwin1.dll is completed.  That method takes
advantage of the fact that the fork issue only occurs during the final
step of the install and presumably nothing is using cygwin1.dll when
the prior step that installs cygwin1.dll is completed.  So ideally
this method would be completely error free, but I will see about that,
and if not I will fall back to trying your method.

Thanks to you and the many (!) other posters here for clarifying the
issue (i.e., that the fork issue I see as a result of running
setup.exe is in one of the invoked commands that are linked to
cygwin1.dll that is downloaded by setup.exe and not in setup.exe

More later.

Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (; the Time
Ephemerides project (; PLplot scientific plotting
software package (; the libLASi project
(; the Loads of Linux Links project (;
and the Linux Brochure Project (

Linux-powered Science

Problem reports:
Unsubscribe info:

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