Re: NOTE_TRACK, EVFILT_PROC, kqueue, and subreapers

From: Martin \ <et.code_at_ethome.sk>
Date: Wed, 14 Dec 2016 16:04:11 +0100

On Tue, 13 Dec 2016 10:49:19 +0000
Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups_at_NTLWorld.com> wrote:

> Martin "eto" Misuth:
> > Subreaper won't even wake when it acquires new child.
>
> You're following the other discussion about this, ne?

I hope meant you this one.

No my trips into kqueue/kvent land are very very simple ones.
I did some 30 lines examples from net, watched dir, watched socket.
In the past I did some luajit infested abominations but my memories are hazy
it was probably garbage. However compared to <something>fd of Linux the
whole system makes much more sense to me.

Currently, in ets6-reaper, I am trying to (ab)use most of skalibs, so I
decided to use iopause().

As it seems iopause() uses select() or (p)poll(). With null timeout, this
"locks" whole reaper, which is intentional. Reparenting happens auto-magically
on kernel side. Only when termination (SIGTERM) or child death (SIGCHLD) signal
comes, thing wakes up and does it's job. This is intentional as I wanted it to
be idle as much as possible. iopause() was chosen because it works on both
platforms I care about.

However for jails, I did really nasty things, I don't want to go into here
exactly, at the moment. But in that context, I am seriously pondering on
using kqueue. Should that ever happen I would be grateful if I was able to
wake up on child reparent event.

One major pain point I still have to deal with, is that I have to use Linux.

  eto
Received on Wed Dec 14 2016 - 15:04:11 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:19 UTC