0

我正在尝试修补 Android 的 init 以允许卸载 Android 并在已初始化的硬件上加载 Ubuntu。是我正在尝试的补丁。

但是在 kill -USR1 1 内核出现恐慌并且重新启动后,我在 RAM 控制台中看到了下一个:

[   96.671325] init: Got SIGUSR1, trying to execve /system/xbin/ubuntu.sh
[   96.680786] init: fork done, pid=1
[   96.685089] [K] Kernel panic - not syncing: Attempted to kill init!
[   96.685150] [<c010ac50>] (unwind_backtrace+0x0/0xe0) from [<c0596408>] (panic+0x6c/0x198)
[   96.685150] [<c0596408>] (panic+0x6c/0x198) from [<c017e1d0>] (do_exit+0x98/0x650)
[   96.685180] [<c017e1d0>] (do_exit+0x98/0x650) from [<c017ea34>] (do_group_exit+0x84/0xc0)
[   96.685211] [<c017ea34>] (do_group_exit+0x84/0xc0) from [<c017ea80>] (__wake_up_parent+0x0/0x18)
[   96.685241] CPU1: stopping
[   96.685333] [<c010ac50>] (unwind_backtrace+0x0/0xe0) from [<c0109e2c>] (handle_IPI+0xd4/0x140)
[   96.685424] [<c0109e2c>] (handle_IPI+0xd4/0x140) from [<c01053cc>] (__irq_svc+0x4c/0xe4)
[   96.685516] [<c01053cc>] (__irq_svc+0x4c/0xe4) from [<c01058c0>] (ret_fast_syscall+0x0/0x30)
[   96.785858] subsystem-fatal-8x60: Q6 NMI was sent.
[   96.790924] [K] Rebooting in 5 seconds..
[  101.798248] [K] Going down for restart now

fork() 如何将 pid==1(子进程的)返回给已经有 pid==1 的父进程 init?

谢谢你!

4

1 回答 1

0

strerror在信号处理程序中是不安全的,所以从那里开始!:-)

于 2013-03-11T11:19:28.827 回答