* On quitting and exiting
@ 2013-03-14 4:40 Mike Gran
2013-03-14 5:14 ` Nala Ginrut
2013-03-14 8:55 ` Andy Wingo
0 siblings, 2 replies; 4+ messages in thread
From: Mike Gran @ 2013-03-14 4:40 UTC (permalink / raw)
To: guile-devel
Hello.
There seem to be four ways to force an exit.
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?
Thanks,
Mike
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: On quitting and exiting
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
1 sibling, 1 reply; 4+ messages in thread
From: Nala Ginrut @ 2013-03-14 5:14 UTC (permalink / raw)
To: Mike Gran; +Cc: guile-devel
On Wed, 2013-03-13 at 21:40 -0700, Mike Gran wrote:
> Hello.
>
> There seem to be four ways to force an exit.
>
> 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?
>
>
[Out of topic]
Many cool things in Guile lacks of document, maybe I should drop to look
forward to adding new features to Guile but do some help for manual
first...
> Thanks,
>
> Mike
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: On quitting and exiting
2013-03-14 4:40 On quitting and exiting Mike Gran
2013-03-14 5:14 ` Nala Ginrut
@ 2013-03-14 8:55 ` Andy Wingo
1 sibling, 0 replies; 4+ messages in thread
From: Andy Wingo @ 2013-03-14 8:55 UTC (permalink / raw)
To: Mike Gran; +Cc: guile-devel
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/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-03-14 8:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).