Changeset 34904 in project
- Timestamp:
- 11/22/17 21:03:52 (3 years ago)
- Location:
- wiki/man/5
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
wiki/man/5/Module (chicken base)
r34833 r34904 1038 1038 TODO: Document declare (keep the "declarations" section?) 1039 1039 1040 === Process shutdown 1041 1042 ==== emergency-exit 1043 1044 <procedure>(emergency-exit [CODE])</procedure> 1045 1046 Exits the current process without flushing any buffered output (using 1047 the C function {{_exit}}). Note that the {{exit-handler}} is not called 1048 when this procedure is invoked. The optional exit status code {{CODE}} 1049 defaults to {{0}}. 1050 1051 1052 ==== exit 1053 1054 <procedure>(exit [CODE])</procedure> 1055 1056 Exit the running process and return exit-code, which defaults to 0 1057 (Invokes {{exit-handler}}). 1058 1059 Note 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 1066 A procedure of a single optional argument. When {{exit}} is called, 1067 then this procedure will be invoked with the exit-code as argument. The 1068 default behavior is to terminate the program. 1069 1070 Note that this handler is ''not'' invoked when {{emergency-exit}} is 1071 used. 1072 1073 1074 === implicit-exit-handler 1075 1076 <parameter>(implicit-exit-handler)</parameter> 1077 1078 A procedure of no arguments. When the last toplevel expression of the 1079 program has executed, then the value of this parameter is called. The 1080 default behaviour is to invoke all pending finalizers. 1081 1082 1083 ==== on-exit 1084 1085 <procedure>(on-exit THUNK)</procedure> 1086 1087 Schedules the zero-argument procedures {{THUNK}} to be executed before 1088 the process exits, either explicitly via {{exit}} or implicitly after 1089 execution of the last top-level form. Note that finalizers for 1090 unreferenced finalized data are run before exit procedures. 1091 1040 1092 --- 1041 1093 Previous: [[Module srfi-4]] -
wiki/man/5/Module (chicken process-context)
r34492 r34904 40 40 {{(car (argv))}} for compiled programs or the filename following the 41 41 {{-script}} option in interpreted scripts. 42 43 44 45 === Process shutdown46 47 ==== emergency-exit48 49 <procedure>(emergency-exit [CODE])</procedure>50 51 Exits the current process without flushing any buffered output (using52 the C function {{_exit}}). Note that the {{exit-handler}} is not called53 when this procedure is invoked. The optional exit status code {{CODE}}54 defaults to {{0}}.55 56 57 ==== exit58 59 <procedure>(exit [CODE])</procedure>60 61 Exit the running process and return exit-code, which defaults to 062 (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-handler68 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. The73 default behavior is to terminate the program.74 75 Note that this handler is ''not'' invoked when {{emergency-exit}} is76 used.77 78 79 === implicit-exit-handler80 81 <parameter>(implicit-exit-handler)</parameter>82 83 A procedure of no arguments. When the last toplevel expression of the84 program has executed, then the value of this parameter is called. The85 default behaviour is to invoke all pending finalizers.86 87 88 ==== on-exit89 90 <procedure>(on-exit THUNK)</procedure>91 92 Schedules the zero-argument procedures {{THUNK}} to be executed before93 the process exits, either explicitly via {{exit}} or implicitly after execution94 of the last top-level form. Note that finalizers for unreferenced finalized95 data are run before exit procedures.96 42 97 43
Note: See TracChangeset
for help on using the changeset viewer.