Re: avltree / genalloc

2018-04-12 Thread Laurent Bercot
Ok, so let me ask you this: I want to delete my avltree. That is, I'd like to remove all its nodes and be done with it, i.e. I need to free all memory associated with it. I guess avltree_free() is enough, no need to delete each node individually? Yes, avltree_free() is enough, because an avlt

Re: avltree / genalloc

2018-04-12 Thread Olivier Brunel
Many thanks for the explaination/clarifications! > avltree_iter isn't meant to perform operations that modify the > structure > of the tree. It *may* work, but there's no guarantee it will - and > typically, if you modify the tree, later values for node height will > certainly be incorrect.

Re: avltree / genalloc

2018-04-12 Thread Laurent Bercot
- When using avltree_iter() we need to pass a avliterfunc_t_ref, which takes 3 arguments. If I understand correctly, first is the uint32_t index, then the tree's "internal" (unsigned int) index, and my pointer. "The uint32_t index" is confusing terminology, so to clarify, I call this number

avltree / genalloc

2018-04-12 Thread Olivier Brunel
Hey, So I've been using avltree & gensetdyn (amongst others) lately in a little project of mine, and I have some questions: - When using avltree_iter() we need to pass a avliterfunc_t_ref, which takes 3 arguments. If I understand correctly, first is the uint32_t index, then the tree's "intern

Re: [s6-networking] silent option for s6-tcpclient

2018-04-12 Thread Laurent Bercot
Hi all - I had a use-case where I needed s6-tcpclient to be completely silent, no matter the error (my existing system reads standard output and standard error, and tries to parse it). Sorry, not applying this patch. Parsing stderr is not supported: this would make error message format a public

[PATCH] [s6-networking] add silent option to s6-tcpclient

2018-04-12 Thread John Regan
If the user passes "-s" to s6-tcpclient, all warning and error messages will be supressed, making s6-tcpclient completely transparent. --- doc/s6-tcpclient.html | 3 +- src/conn-tools/s6-tcpclient.c | 73 +++ 2 files changed, 41 insertions(+), 35 de

[s6-networking] silent option for s6-tcpclient

2018-04-12 Thread John Regan
Hi all - I had a use-case where I needed s6-tcpclient to be completely silent, no matter the error (my existing system reads standard output and standard error, and tries to parse it). Long-term, I'm going to change the system to log (but not parse) standard error from child processes. In the mean