From: Thien-Thi Nguyen <ttn@gnuvola.org>
To: guile-devel@gnu.org
Subject: rfc: script exit value from ENTRY-POINT retval
Date: Thu, 22 Jul 2010 11:00:16 +0200 [thread overview]
Message-ID: <87wrsn28nz.fsf@ambire.localdomain> (raw)
In Guile 1.4.x, i just installed this:
* for scripts with -e ENTRY-POINT, exit value is ENTRY-POINT retval
Previously, ENTRY-POINT retval was ignored; scripts would always exit
successfully (exit value of zero) unless ‘exit’ was called explicitly.
This change is backward compatible if you explicitly call ‘exit’;
there is no change in behavior. On the other hand, if ENTRY-POINT
blithely returns #f or a non-zero integer, that value is no longer
masked; the script will now exit failurefully.
This change removes the small but gratuitous conceptual discrepency
between C ‘main’ and Scheme ENTRY-POINT, making ENTRY-POINT easier to
use internally, generally (caller no longer needs to catch ‘quit’).
In Guile 1.4.x, all scripts/* programs use ‘HVQC-MAIN’, which does
‘exit’ explicitly. The other big corpus of scripts i have experience
with is ttn-do, which used to use ‘HVQC-MAIN’, but now (with the intent
of porting to Guile 2) uses a simpler mechanism that generally does NOT
do ‘exit’ explicitly.
What do people think of making this change in Guile 2.x and 1.8.x?
(Included in the change would be an audit/update of bundled scripts.)
thi
next reply other threads:[~2010-07-22 9:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-22 9:00 Thien-Thi Nguyen [this message]
2010-07-24 21:53 ` rfc: script exit value from ENTRY-POINT retval Neil Jerram
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=87wrsn28nz.fsf@ambire.localdomain \
--to=ttn@gnuvola.org \
--cc=guile-devel@gnu.org \
/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).