On 19.04.19 23:24, Daniel Colascione wrote:
Hi folks,
<big_snip>
I haven't followed the whole thread, so forgive me if I'm going to write something dumb here ... but: this all feels a bit complicated to me.
Why not just making the pidfd present a stream of events (which are encoded as text lines) ? It would behave just like any stream, eg. socket, chardev, ...
An `cat` on a pidfd could look like this:
<timestamp> EXIT <exitcode> <timestamp> EXEC <cmdline> <timestamp> SIGNAL <sigid> ...
IOW: just using POLLIN. Let the listener just read all events and decide which ones he's actually acting on.
In the other direction we could write in commands, eg. for sending signals.
--mtx