unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* rfc: script exit value from ENTRY-POINT retval
@ 2010-07-22  9:00 Thien-Thi Nguyen
  2010-07-24 21:53 ` Neil Jerram
  0 siblings, 1 reply; 2+ messages in thread
From: Thien-Thi Nguyen @ 2010-07-22  9:00 UTC (permalink / raw)
  To: guile-devel

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-07-24 21:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-22  9:00 rfc: script exit value from ENTRY-POINT retval Thien-Thi Nguyen
2010-07-24 21:53 ` Neil Jerram

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).