sys.on.exit appears non-functional (PR#269)

ripley@stats.ox.ac.uk ripley@stats.ox.ac.uk
Tue, 7 Sep 1999 18:42:01 +0200 (MET DST)


As far as I can see sys.on.exit() does not work. The following
will give a non-null result in S, and seems about the simplest possible
usage.

test <- function() {
  on.exit(print(1))
  ex <- sys.on.exit()
  str(ex)
  cat("exiting...\n")
}
> test()
 NULL
exiting...
[1] 1

Looking at the code suggests that on.exit is installing the code in
a different context from the one sys.on.exit is looking in, but this is
daunting for non-experts.

The help page does not say what this is supposed to do, of course, but
I assume it is intended to retrieve the on.exit expression, as in S.

--please do not edit the information below--

Version:
 platform = sparc-sun-solaris2.6
 arch = sparc
 os = solaris2.6
 system = sparc, solaris2.6
 status = 
 status.rev = 0
 major = 0
 minor = 65.0
 year = 1999
 month = August
 day = 27
 language = R

Search Path:
 .GlobalEnv, Autoloads, package:base


-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._