This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 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: xfree86 install makes wininit not working


Ilya,

Very interesting.

On Windows NT 3.1, 4.0, Windows 2000, and (I believe) Windows XP you don't
use the wininit.ini approach.  There is a new function (only about 8 years
old now) called MoveFileEx that can be passed the flag
MOVEFILE_DELAY_UNTIL_REBOOT which stores a list of files to be moved upon
reboot in the registry at:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session
Manager\PendingFileRenameOperations


Robert may want to comment on whether this method is used or not in
setup.exe.

In any case the list of files to move could contain several thousand entries
if the XFree86 fonts packages are to be replaced upon reboot.  This would
take several minutes to move.  It was probably not a good thing that you
aborted this process... my guess is that it would have completed
successfully in ten to twenty minutes :)

> P.S. I guess the other burning question is why did setup.exe
> decide that it
> couldn't overwrite the Xfree files even though Xfree wasn't in use?

Think about your programmatic options here.  You are trying to determine if
the files in the XFree86 packages are being used, so you can:

1) Assume that if cygwin1.dll is being used then *all* packages are being
used.  When cygwin1.dll is not being used this allows you to install each
file with a single function call (i.e. MoveFile).  However, when cygwin1.dll
is being used you have to either use wininit.ini or use MoveFileEx with
MOVEFILE_DELAY_UNTIL_REBOOT for every single file.

2) Attempt to move each file individually; upon failure, add the file to the
wininit.ini list or call MoveFileEx with MOVEFILE_DELAY_UNTIL_REBOOT.
You've got a problem here: what if a program opens a file, reads part of it,
closes the file, then opens it again later and resumes reading where it left
off?  You're going to get into trouble if you replace such a file out from
under a running process.  On the other hand, Linux seems to think that this
is allowable, as Linux lets you overwrite any file, regardless of whether it
is being used.  The main problem with this method is that for every file
that is being used (could be thousands) you have to make two functions calls
instead of just one (one to find out it is being used, one to add it to the
list of files to replace upon reboot).


I'm guessing that Cygwin's setup.exe uses a method similar to the method I
described in (1), but I'll wait for Robert to comment on this.  Perhaps
Cygwin's setup.exe should consider using a method similar to (2), if it
doesn't already.

In related news: I think I'm going to hold off on making any wide-spread
announcements about Cygwin/XFree86 being available via setup.exe.  I'm not
comfortable with the installation process causing several minute delays in
starting the PC and in the possibility of the wininit.ini becoming too large
or not preserving long filenames.


Harold


> -----Original Message-----
> From: cygwin-xfree-owner@cygwin.com
> [mailto:cygwin-xfree-owner@cygwin.com]On Behalf Of Ilya Goldin
> Sent: Sunday, April 21, 2002 1:52 PM
> To: cygwin-xfree@cygwin.com
> Subject: Re: xfree86 install makes wininit not working
>
>
> "Harold Hunt" <huntharo@msu.edu> wrote in message
> NHEELHJHHFKPMAEAFMFCCECFCNAA.huntharo@msu.edu">news:NHEELHJHHFKPMAEAFMFCCECFCNAA.huntharo@msu.edu...
> > Basically: do we need to pull the Cygwin/XFree86 setup.exe release for
> now,
> > or can I go on with making changes to the web page, etc to announce the
> > release?
>
>
> Personal experience: I installed Xfree via the new setup.exe
> routine over an
> existing 4.2.0 installation. At the time, I was running rxvt and openssh,
> but not running Xfree. Cygwin warned me I'd have to restart to replace
> files.
>
> When I restarted, Win2K (which is what I'm running here, with all
> the latest
> patches), got stuck at the end of its second start-up screen (the
> first one
> is text-mode, the second one has the pretty W2K logo and a blue progress
> indicator). I could see my HD light blinking, and the PC was
> obviously doing
> something, but it remained "stuck" on this screen for several
> minutes. This
> repeated after a hard reset (couldn't do a soft one). Ultimately, I had to
> boot into the F8-on-startup screen, and go with "last known good config".
> Only that got me back into W2K. (I was getting pretty worried by
> this time!)
>
> Having read the list since, I surmise that the WININIT.INI routine was
> replacing files during that start-up screen delay, but it took so
> ridiculously long (on a Pentium II 400, w/ 256 RAM), that I had to do
> several hard restarts to get anywhere, and ended up aborting that
> procedure
> anyway. (After which I deleted my entire Cygwin setup and reinstalled from
> scratch.)
>
> Notes from the field,
> ig
> P.S. I guess the other burning question is why did setup.exe
> decide that it
> couldn't overwrite the Xfree files even though Xfree wasn't in use?
>
> -- Ilya Goldin <www.pitt.edu/~goldin>
>
>
>
>


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