From: Andy Wingo <wingo@pobox.com>
To: Mike Gran <spk121@yahoo.com>
Cc: guile-devel <guile-devel@gnu.org>
Subject: Re: On quitting and exiting
Date: Thu, 14 Mar 2013 09:55:21 +0100 [thread overview]
Message-ID: <87vc8ucqdi.fsf@pobox.com> (raw)
In-Reply-To: <1363236047.97499.YahooMailNeo@web120402.mail.ne1.yahoo.com> (Mike Gran's message of "Wed, 13 Mar 2013 21:40:47 -0700 (PDT)")
On Thu 14 Mar 2013 05:40, Mike Gran <spk121@yahoo.com> writes:
> In boot-9, a function `quit' is defined. It appears in the manual,
> but, in boot-9 it can take an argument. In the manual it never
> takes an argument.
>
> In boot-9, `exit' is aliased to quit. In the manual `exit' is
>
> undocumented; however, in the documentation in (rnrs programs),
> it notes that (rnrs programs)'s version of exit is the same
> as the "core" version of exit.
>
> And then there is primitive-exit and primitive-_exit, which are
> described in the manual.
>
> So clearly, there's some confusion here. Are 'quit' and 'exit'
> supposed to be API? Is the fact that they can take an argument
> supposed to be documented?
>
> Or is 'primitive-exit' the generally the way to go?
`primitive-_exit' is the C `_exit' function. It quits immediately,
without calling atexit() functions.
`primitive-exit' is the C `exit' function. It runs atexit() functions
and then quits.
The Scheme `exit' function throws `quit', which is handled by the
outermost catch handler, which calls the C `exit' function. In this way
calling Scheme's `exit' unwinds the dynamic stack.
They should all be documented.
Hope that helps,
Andy
--
http://wingolog.org/
prev parent reply other threads:[~2013-03-14 8:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-14 4:40 On quitting and exiting Mike Gran
2013-03-14 5:14 ` Nala Ginrut
2013-03-14 6:13 ` Thien-Thi Nguyen
2013-03-14 8:55 ` Andy Wingo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87vc8ucqdi.fsf@pobox.com \
--to=wingo@pobox.com \
--cc=guile-devel@gnu.org \
--cc=spk121@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).