Re: [Rd] sys.on.exit not working (PR#7665)

From: Prof Brian Ripley <>
Date: Tue 08 Feb 2005 - 01:23:40 EST

It is working as documented: there is no on.exit set for str, is there?

      'sys.on.exit()' retrieves the expression stored for use by
      'on.exit' in the function currently being evaluated. (Note that
      this differs from S, which returns a list of expressions for the
      current frame and its parents.)

I see you have looked at PR#269, but did not notice the crucial difference: here the current function is str (it is evaluating its arguments), not soe.test.

On Mon, 7 Feb 2005 wrote:

> Full_Name: Mark Bravington
> Version: 2.0.1
> OS: Windows XP
> Submission from: (NULL) (
> 'sys.on.exit()' doesn't seem to be working, since R1.7.1 at least:

Please read the FAQ: we don't want R-bugs clogged up with `doesn't seem to be working' reports, and we do say so.

> soe.test <- function() {
> on.exit( cat( 'In exit code\n'))
> str( sys.on.exit()) # should display "language..." I think
> 12
> }
> (A similar bug was apparently fixed for version 0.65!)

One difference being that PR#269 was a bug, and this is not.

Brian D. Ripley,        
Professor of Applied Statistics,
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________ mailing list
Received on Tue Feb 08 00:40:21 2005

This archive was generated by hypermail 2.1.8 : Fri 18 Mar 2005 - 09:02:44 EST