You are viewing a plain text version of this content. The canonical link for it is here.
Posted to websh-dev@tcl.apache.org by Ronnie Brunner <ro...@netcetera.ch> on 2002/03/27 20:28:31 UTC

Re: interpool.c: initPool

we're still talking about 

   interpool.c:485   int initPool(websh_server_conf * conf)

> We should also return 0 to let the next layer up know that we weren't
> successful.

I would actually also remove the "called" stuff, since this also can't
happen because by definition it should be called only once.
The whole issue is somehow not handled consistently now:

- why do we check at all?
- if we really get there, why do we destroy the pool but not the
  mainInterp?
- what happens if we actually return 0 (can an init_child func fail)?

Summing it up, I'd dump the whole if clause:

  int initPool(websh_server_conf * conf)
  {
      Tcl_FindExecutable(NULL);

      /* create a single main interpreter */
      conf->mainInterp = createMainInterp(conf);

      ...

      return 1;
  }

In addition, we should find out what to do if we ever return 0 in initPool.

------------------------------------------------------------------------
Ronnie Brunner                               ronnie.brunner@netcetera.ch
Netcetera AG, 8040 Zuerich    phone +41 1 247 79 79 Fax: +41 1 247 70 75

---------------------------------------------------------------------
To unsubscribe, e-mail: websh-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: websh-dev-help@tcl.apache.org


Re: interpool.c: initPool

Posted by "David N. Welton" <da...@dedasys.com>.
Ronnie Brunner <ro...@netcetera.ch> writes:

> we're still talking about 

>    interpool.c:485   int initPool(websh_server_conf * conf)

> > We should also return 0 to let the next layer up know that we
> > weren't successful.

> I would actually also remove the "called" stuff...


> Summing it up, I'd dump the whole if clause:

Done.

> In addition, we should find out what to do if we ever return 0 in initPool.

    if (!initPool(conf)) {
	ap_log_error(APLOG_MARK, APLOG_ERR, NULL, s,
		     "Could not init interp pool\n");
	return;
    }

Nothing explicit, but things are at this point broken enough that they
will error out further on down the line.  The only other thing we
could do is exit...

-- 
David N. Welton
   Consulting: http://www.dedasys.com/
     Personal: http://www.dedasys.com/davidw/
Free Software: http://www.dedasys.com/freesoftware/
   Apache Tcl: http://tcl.apache.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: websh-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: websh-dev-help@tcl.apache.org