    {"time",      os_time},
    {"tmpname",   os_tmpname},
    {NULL, NULL}
-@@ -404,6 +419,594 @@
+@@ -404,6 +419,618 @@
  
  LUAMOD_API int luaopen_os (lua_State *L) {
    luaL_newlib(L, syslib);

+  lua_pop(L, 1); // spawn_procs
+  return n;
+}
+#endif
+
+/** spawn() Lua function. */

+    l_setcfunction(L, -1, "close", lp_close);
+    l_setcfunction(L, -1, "kill", lp_kill);
+    l_setcfunction(L, -1, "__tostring", lp_tostring);
+#if (GTK && !__APPLE__)
+    l_setcfunction(L, -1, "__gc", lp_gc);
+#endif
+    lua_pushvalue(L, -1), lua_setfield(L, -2, "__index");
