ANDROID boot process analysis 03--UEVENT & WATCHDOG key process in INIT startup

insert image description here

1 UEVENT Entrance

Uevent is a daemon process that receives uevent. Here its main function is to create or delete /dev/xxx (xxx device name) according to the uevent event received by the kernel. The main function is implemented as follows:

int ueventd_main(int argc, char **argv)
{
    
    
    struct pollfd ufd;
    int nr;
    char tmp[32];
 
    umask(000);
    signal(SIGCHLD, SIG_IGN);
    open_devnull_stdio();//输入输出重定向
    klog_init();
#if LOG_UEVENTS
    /* Ensure we're at a logging level that will show the events */
    if (klog_get_level() < KLOG_INFO_LEVEL) {
    
    
        klog_set_level(KLOG_INFO_LEVEL);
    }
#endif
    //selinux相同,同init
    union selinux_callback cb;

Guess you like

Origin blog.csdn.net/wzx311/article/details/129951349