Re: Could "kill" supplied by util-linux stop defunct a process

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 06, 2011 at 12:32:42PM +0200, Karel Zak wrote:
> On Fri, May 06, 2011 at 09:51:13AM +0200, Dr. Werner Fink wrote:
> > On Thu, May 05, 2011 at 04:33:44PM -0400, Phillip Susi wrote:
> > > On 5/5/2011 9:04 AM, Jon Grant wrote:
> > > >>pretty sure you are correct.  i dont believe the kernel currently
> > > >>supports forcibly reparenting of non-child processes.
> > > >
> > > >Do you think there is enough of an itch, for someone to scratch?
> > > 
> > > I doubt it because it seems like a solution in search of a problem.
> > > Normally init reaps any children it inherits.  If you are seeing a
> > > bunch of zombie processes owned by init, then your init seems to be
> > > buggy. Even so, zombies don't use any cpu, and virtually no ram, so
> > > it isn't much of an issue.
> > 
> > The standard sysvinit uses a signal handler on SIGCHLD to collect
> > all of its children which has died.  I guesss that systemd does
> > nearly the same.  If a normal process uses a signal handler it
> > should make sure that the signal handler is restarted (SA_RESTART)
> > and not blocked by any signal mask, also within the signal handler
> > should pick up all available childs.
> 
> I guess that systemd monitories processes by cgroups
> 
>   /sys/fs/cgroup/systemd/release_agent
>   /sys/fs/cgroup/systemd/systemd-1/*.service/notify_on_release
> 
> cgroups seems like a more reliable and comfortable solution.

Yep, for monitoring cgroups are perfect as with this you can
monitor not one process but all within the same c(ontrol)group
... nevertheless AFAIK died childs should be collected as well
by init if the original parent was died.  AFAIK this is done
in manager_dispatch_sigchld() of systemd ... or does this have
changed in the meanwhile?

     Werner

-- 
  "Having a smoking section in a restaurant is like having
          a peeing section in a swimming pool." -- Edward Burr
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux