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

pkg kill



    Date: Wed, 23 Sep 1992 05:35 EDT
    From: Vincent Keunen <nrb!keunen@relay.EU.net>

    I was surprised by the fact that I was able to call (scl:pkg-kill
    "nanesse") and effectively kill that package in a window in which I had
    previously done a "set package nanesse".  What does scl:pkg-kill really
    do not to complain about killing a package that's being used by a
    listener?

PKG-KILL removes the package from the table that maps package names to
package objects, and removes the package from the use-list of other
packages.  Here's the documentation:

       Kills package by removing it from all package system data structures.
       The name and nicknames of package cease to be recognized package
       names. If package is used by other packages, it is un-used, causing
       its external symbols to stop being accessible to those packages. If
       other packages have relative names for package, the names are
       deleted.

       Any symbols in package still exist and their home package is not
       changed. If this is undesirable, evaluate (zl:mapatoms #'zl:remob
       package nil) first.

Note that the package object still exists, so it can still be the value
of a variable (such as *PACKAGE*).

Note that the function DELETE-PACKAGE in dpANS CL is different from
this.  It specifies that the consequences are undefined if you try to
look up a symbol in a deleted package, and that the home packages of
symbols whose home package was the deleted package are
implementation-dependent.

It might be reasonable for an implementation to issue a warning when a
package that's in use by a listener is deleted, since the dpANS
DELETE-PACKAGE makes such a listener nearly unusable (you'd have to type
explicit package prefixes on every symbol until you switch to a
non-deleted package).

                                                barmar