[PATCH] prepare streams based messaging

Jeremy Allison jra at samba.org
Mon Jun 6 18:44:59 UTC 2016


On Wed, Jun 01, 2016 at 04:44:53PM +1000, Amitay Isaacs wrote:
> On Sat, May 28, 2016 at 1:01 AM, Volker Lendecke <Volker.Lendecke at sernet.de>
> wrote:
> 
> > Hi!
> >
> > Attached find two patches: The first is a set of patches preparing the
> > second one. "look" cleans up some dependencies, making some
> > infrastructure more generally useful. I'd like to put that in now.
> > Review appreciated!
> >
> > The second one, "tfd", is the start of what I've talked about @
> > sambaxp. It's the stream socket introducer. Our plan is to also use it
> > for ctdb communication, I've already done some changes after talking
> > to Amitay about it. So, not really used yet, but if you're curious,
> > feel free to take a look :-)
> >
> > Thanks, Volker
> 
> 
> I uncovered a problem while trying to run the tests fddrn/fdsrc.
> 
> I tried to run fddrn as follows:
> 
>     $ bin/fddrn bin/tfdd /tmp/tfd
>     tfd_init failed: No such file or directory
> 
> While debugging this, I figured out that the tfdd path needs to be absolute.
> 
> Q: Do you need to do chdir("/") in tfd_tfdd_child()?  Can we do that in
> tfdd binary?
> 
> Since exeve failed, tfd_spawn_tfdd() returned EBUSY.  So I guess the check
> for ret needs be fixed.
> 
> @@ -104,7 +104,7 @@ int tfd_init(const char *tfdd_exec, const char
> *tfdd_sock,
>                       sizeof(state->addr));
>         if ((ret == -1) && (state->tfdd_exec[0] != '\0')) {
>                 ret = tfd_spawn_tfdd(state->tfdd_exec, tfdd_sock);
> -               if (ret == -1) {
> +               if (ret != 0) {
>                         goto fail;
>                 }
>                 ret = connect(state->sock,

Yes, this is certainly correct. tfd_spawn_tfdd() returns 0 or
errno (pthread-style returns).

I'm reading through the tfd patchset now. Damn, this is some
clever code !

Great job Volker.



More information about the samba-technical mailing list