hush/init
Eric Andersen 9cdef5d928 Yang Xiaopeng writes:
>I'm sure that no user process use old root now,  but when run "umount
>/old_root", it says:
>   umount: /old_root: Device or resource busy
>
>I have tried to remount /proc within the new root *after* chroot, but
>get the same result.
>
>
I found the problem, I said that no user process use old root when run
my scripts, but
I'm wrong, actually there is a '3' fd open the file
"/old_root/dev/console". By adding
debug message in init/init.c, I found the problem: when init restart(in
exec_signal()),
before open the new terminal device, there is still a file opened(I
don't know which file it is), so the
terminal device(stdin) get fd '1', and the first dup(0)(stdout) return
'2', the second(stderr) return '3'.

I attach a simple patch to solve this problem.
2003-07-29 06:33:12 +00:00
..
Config.in Move start_stop_daemon to debianutils. 2003-07-26 09:16:00 +00:00
halt.c Support reboot, halt, and poweroff independent of busybox init. 2003-07-22 09:41:39 +00:00
init_shared.c Several simplifications and indenting changes, per 2003-07-22 17:14:10 +00:00
init_shared.h Support reboot, halt, and poweroff independent of busybox init. 2003-07-22 09:41:39 +00:00
init.c Yang Xiaopeng writes: 2003-07-29 06:33:12 +00:00
Makefile
Makefile.in Move start_stop_daemon to debianutils. 2003-07-26 09:16:00 +00:00
mesg.c
minit.c
msvc.c
pidfilehack.c
poweroff.c Support reboot, halt, and poweroff independent of busybox init. 2003-07-22 09:41:39 +00:00
reboot.c As vodz noticed, I screwed up reboot 2003-07-22 17:04:54 +00:00