Changeset 34904 in project for wiki/man/5/Module (chicken base)


Ignore:
Timestamp:
11/22/17 21:03:52 (4 years ago)
Author:
sjamaan
Message:

man/5: Move the "exit" family of procedures from (chicken process-context) to (chicken base)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/man/5/Module (chicken base)

    r34833 r34904  
    10381038TODO: Document declare (keep the "declarations" section?)
    10391039
     1040=== Process shutdown
     1041
     1042==== emergency-exit
     1043
     1044<procedure>(emergency-exit [CODE])</procedure>
     1045
     1046Exits the current process without flushing any buffered output (using
     1047the C function {{_exit}}).  Note that the {{exit-handler}} is not called
     1048when this procedure is invoked. The optional exit status code {{CODE}}
     1049defaults to {{0}}.
     1050
     1051
     1052==== exit
     1053
     1054<procedure>(exit [CODE])</procedure>
     1055
     1056Exit the running process and return exit-code, which defaults to 0
     1057(Invokes {{exit-handler}}).
     1058
     1059Note that pending {{dynamic-wind}} thunks are ''not'' invoked when exiting your program in this way.
     1060
     1061
     1062=== exit-handler
     1063
     1064<parameter>(exit-handler)</parameter>
     1065
     1066A procedure of a single optional argument. When {{exit}} is called,
     1067then this procedure will be invoked with the exit-code as argument. The
     1068default behavior is to terminate the program.
     1069
     1070Note that this handler is ''not'' invoked when {{emergency-exit}} is
     1071used.
     1072
     1073
     1074=== implicit-exit-handler
     1075
     1076<parameter>(implicit-exit-handler)</parameter>
     1077
     1078A procedure of no arguments. When the last toplevel expression of the
     1079program has executed, then the value of this parameter is called. The
     1080default behaviour is to invoke all pending finalizers.
     1081
     1082
     1083==== on-exit
     1084
     1085<procedure>(on-exit THUNK)</procedure>
     1086
     1087Schedules the zero-argument procedures {{THUNK}} to be executed before
     1088the process exits, either explicitly via {{exit}} or implicitly after
     1089execution of the last top-level form. Note that finalizers for
     1090unreferenced finalized data are run before exit procedures.
     1091
    10401092---
    10411093Previous: [[Module srfi-4]]
Note: See TracChangeset for help on using the changeset viewer.