> After doing this I realized the idled process have parent pid of 1.
>
> root 17606 1 0 21:26 pts/9 00:00:00 idled
>
> This means that when master process is killed (SIGQUIT/SIGTERM) idled daemon
> is not killed along all process from cyrus imapd. So, stopping/starting cyrus
> let a lot of idled daemons running, until I realized the problem.
I have tracked the issue to this code in idled.c:
if (pid != 0) { /* parent */
exit(0);
}
Parent is exiting so child gets ppid 1.
Not sure why fork is needed in idled really.