stdio_late_exit_entrypoint.mojo (495B)
1 """Test-only stdio entrypoint that emits valid JSON, closes stdio and lingers. 2 3 Exercises PC03: a child that finishes its output and then delays exit past the 4 parent's declared budget must be rejected within that budget, with the bounded 5 cleanup grace used only for cleanup. 6 """ 7 8 from std.ffi import c_int, external_call 9 from std.sys._libc import close 10 11 12 def main(): 13 print('{"ok":true}') 14 _ = close(c_int(1)) 15 _ = close(c_int(2)) 16 _ = external_call["usleep", c_int](c_int(1500000))