Pending patches
Denys Vlasenko
vda.linux at googlemail.com
Wed Oct 29 02:48:49 UTC 2008
On Monday 27 October 2008 09:53, Vladimir Dronnikov wrote:
> Hello, Denys!
>
> I've refreshed the patches at http://drvv.ru/busybox
> Please, take a look
Looking at http://drvv.ru/busybox/runsvdir.patch
On the "nitpicks" level, I propose having less
#if ENABLE_FEATURE_RUNSVDIR_INIT
statements, by using constant-zero is_init if it is not.
See attached patch.
Second, also easy thing - please use /* */ comments
as the rest of this file does.
Harder problems:
+ // let services exit cleanly
+ sync(); sleep(5);
sync() might block for long. With some stupid
situations (runaway process creating more and more
dirty data + kernel buglet), it may never return.
I prefer syncing without waiting, say,
by execing sync() from a child.
+ // kill survived services
+ killall(SIGKILL);
+ sync(); sleep(1);
+ // umount -a
+ // ???
+ // reboot
+ reboot(
+ (SIGUSR1 == bb_got_signal) ? RB_HALT_SYSTEM :
+ (SIGUSR2 == bb_got_signal) ? RB_POWER_OFF :
+ RB_AUTOBOOT
+ );
Do we really want to hard-reboot without remounting RO
or unmounting filesystems?
What if user disagrees with our reboot sequence (needs bigger delays,
wants to free lop devices, etc?). Yes, he can code up "different reboot"
himself, as a shell script. But this exact *our* sequence can be set up
exactly the same way as a shell script, no need to patch runsvdir! Right?
--
vda
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 6.patch
Type: text/x-diff
Size: 3723 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20081029/b84c2dae/attachment.bin
More information about the busybox
mailing list