[Prev][Next][Index][Thread]

# Re: [SERVER] chparent()

- Date: Thu, 21 Mar 1996 11:04:05 PST
- From:
- Content-Type: text/plain; charset="us-ascii"

    At 9:13 AM 3/20/96, Ranalou wrote:
    >I know that it is so with create(), but when a chparent() is done, does
    >the :initialize() verb on the changed object get called?  If not, why?
    >And, if there is no reason why this would be a bad thing, I'd like to add
    >it to the wish-list for future servers...

    Doing it in the server may be a bad thing, but I've hacked an in-database
    equivalent of what you said on BayMOO.  Here's how it works.

    parent     = the parent being chaprented to
    kid        = what's being chparented
    old_parent = the parent being chparented from

    If parent is -f, E_PERM is returmed
    If parent:chparent_acceptable exists and is +x, it is called, with args[1]
    == kid.  If a negative value is returned, than E_PERM is returned.
    The chparent is actually done.
    If parent:chparent_addkid exists and is +x, it is called with args[1] == kid.
    If old_parent:chparent_rmkid exists and is +x, it is called with args[1] == kid.

    For now it's written using $server_options:chparent(), called from
    $chparent().  Since BayMOO uses 1.7.8p5 (the 5 is for a ton of extra
    patches we've added to it), it's all done with forks and stuff to ensure
    that a chparent_addkid traceback doesn't keep chparent_rmkid from being
    called.  (We're looking into 1.8.0, and with TRY, and the bf wrappers, we
    could  make a much cleaner implimentation of it.)

    Phantom

    -----BEGIN PGP PUBLIC KEY BLOCK-----
    Version: 2.6.2

    mQCPAzEtexUAAAEEALPfu202DEwxLQ96BwKL5liDPzdCVox/iSbc201h5oTzLGmT
    v1PU+TmeS/lEtTvVe5WVZ3iDjjKDcoWwc1MRmbCMMVosywXEiXoLqWBTj+hlcKXA
    //TpyK4RRBZodr6eFesy2wSphpXTtJnIduKMDP0XuVgcrOILMUa1Zcdw+pa1ABEB
    AAG0LVJpY2hhcmQgQ29ubmFtYWNoZXIgPHBoYW50b21AYmF5bW9vLnNmc3UuZWR1
    Pg==
    =iME4
    -----END PGP PUBLIC KEY BLOCK-----

- Prev: Re: [SERVER] chparent()
- Next: RE: [SERVER] chparent()
- Index: MOO-cows
- Thread: MOO-cows

Home | Subject Index | Thread Index