Changeset 34904 in project


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

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

Location:
wiki/man/5
Files:
2 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]]
  • wiki/man/5/Module (chicken process-context)

    r34492 r34904  
    4040{{(car (argv))}} for compiled programs or the filename following the
    4141{{-script}} option in interpreted scripts.
    42 
    43 
    44 
    45 === Process shutdown
    46 
    47 ==== emergency-exit
    48 
    49 <procedure>(emergency-exit [CODE])</procedure>
    50 
    51 Exits the current process without flushing any buffered output (using
    52 the C function {{_exit}}).  Note that the {{exit-handler}} is not called
    53 when this procedure is invoked. The optional exit status code {{CODE}}
    54 defaults to {{0}}.
    55 
    56 
    57 ==== exit
    58 
    59 <procedure>(exit [CODE])</procedure>
    60 
    61 Exit the running process and return exit-code, which defaults to 0
    62 (Invokes {{exit-handler}}).
    63 
    64 Note that pending {{dynamic-wind}} thunks are ''not'' invoked when exiting your program in this way.
    65 
    66 
    67 === exit-handler
    68 
    69 <parameter>(exit-handler)</parameter>
    70 
    71 A procedure of a single optional argument. When {{exit}} is called,
    72 then this procedure will be invoked with the exit-code as argument. The
    73 default behavior is to terminate the program.
    74 
    75 Note that this handler is ''not'' invoked when {{emergency-exit}} is
    76 used.
    77 
    78 
    79 === implicit-exit-handler
    80 
    81 <parameter>(implicit-exit-handler)</parameter>
    82 
    83 A procedure of no arguments. When the last toplevel expression of the
    84 program has executed, then the value of this parameter is called. The
    85 default behaviour is to invoke all pending finalizers.
    86 
    87 
    88 ==== on-exit
    89 
    90 <procedure>(on-exit THUNK)</procedure>
    91 
    92 Schedules the zero-argument procedures {{THUNK}} to be executed before
    93 the process exits, either explicitly via {{exit}} or implicitly after execution
    94 of the last top-level form. Note that finalizers for unreferenced finalized
    95 data are run before exit procedures.
    9642
    9743
Note: See TracChangeset for help on using the changeset viewer.