1 The `exit()` function terminates the running program with the given exit 2 code or 0 in case no argument is given or if the argument cannot be 3 converted to an integer. 4 5 The function does not return. 6 7 -- Testcase -- 8 {% 9 print("Before invoking exit()\n"); 10 11 exit(); 12 13 print("After invoking exit()\n"); 14 %} 15 -- End -- 16 17 -- Expect stdout -- 18 Before invoking exit() 19 -- End -- 20 21 -- Expect exitcode -- 22 0 23 -- End -- 24 25 26 Passing a code argument overrides the default "0" value. 27 28 -- Testcase -- 29 {% 30 exit(123) 31 %} 32 -- End -- 33 34 -- Expect exitcode -- 35 123 36 -- End --
This page was automatically generated by LXR 0.3.1. • OpenWrt