ref: ee5dbf6528365a9dd306665f85c707571b974e5c
parent: 84124e12705e3edc8253e06897718028d476525b
author: kvik <kvik@a-b.xyz>
date: Sun Apr 18 21:19:15 EDT 2021
proc: implement p9.exits() (for completeness)
--- a/p9.c
+++ b/p9.c
@@ -170,6 +170,7 @@
{"setenv", p9_setenv},
{"abort", p9_abort},
+ {"exits", p9_exits},
{"sleep", p9_sleep},
{"alarm", p9_alarm},
{"rfork", p9_rfork},
--- a/proc.c
+++ b/proc.c
@@ -2,7 +2,14 @@
p9_abort(lua_State*)
{
abort();
- return 0;
+ /* never */ return 0;
+}
+
+static int
+p9_exits(lua_State *L)
+{
+ exits(luaL_optstring(L, 1, nil));
+ /* never */ return 0;
}
static int