Re: file sync on close(2)
Sorry for the long delay. I've been a bit busy... ;-) On Jun 14, 2004, at 2:31 PM, Justin Walker wrote:
On Jun 14, 2004, at 11:01, Jay A. Kreibich wrote:
The "single user mode" you get on boot, and the "single user mode"
you get via a SIGTERM to init(1) are two different things.
Not really.
Actually, and unfortunately, Jay is correct. Going back down to single-user-mode is something that Darwin does not do very gracefully [or correctly] at the moment. And, as Jay stated, that "second" single-user-mode is quite a bit less functional than the first. Mainly, this is because mach_init disappears. And with it goes lots of mechanism that is expected to be available by the processes one expects to work with in single-user mode. Init also thinks "the old mach_init is still the current one." So, as it launches processes on the way back up - they all will try to talk to the dead mach_init - quite unsuccessfully as you would imagine. But there are also lots of other things that weren't as graceful as they should be. One example is that the dynamic_pager process, which manages the swap file creation/deletion for the kernel, goes away. Any new one that comes up after a trip into single-user mode and back won't know anything about the swap files that were created by the first one. The current protocol between the kernel and this daemon doesn't help in that regard - so confusion reigns there as well. There are a handful of other similar issues. The result is that going back to single-user-mode without the reboot is not a very safe or pleasant thing to do at the moment. Luckily, the reboot really doesn't add much time to the process - so most people don't care about all this. But if you are trying to "add cleanup" at that stage before the reboot, it becomes all too apparent. Mac OS X doesn't support the notion of single-user-mode on the way down, so this isn't a problem there. But people using Darwin in ways Mac OS X doesn't have noticed these and filed the appropriate bug reports already. And before the questions come, yes we are addressing these issues as best we can. But until we nail them all satisfactorily, we don't want to "fix" the mach_init thing. It will make too many things "appear" to work - when they system is none the happier overall. --Jim [demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s] _______________________________________________ darwin-kernel mailing list | darwin-kernel@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-kernel Do not post admin requests to the list. They will be ignored.
participants (1)
-
Jim Magee