1
0
mirror of https://github.com/janet-lang/janet synced 2025-10-09 21:07:43 +00:00

Add os/posix-exec (along os/posix-fork)

Useful for old-style unix daemons, start up scripts, and so on.
Easy to add on top of os/execute.

May want to consider allowing the same IO redirection as os/execute
and os/spawn.

May also want to put both fork and exec behind a config switch since I
suppose some systems may not support them, although I don't know of any
concrete examples.
This commit is contained in:
Calvin Rose
2023-10-08 21:03:08 -05:00
parent 6ae81058aa
commit 549ee95f3d
2 changed files with 44 additions and 6 deletions

View File

@@ -0,0 +1,5 @@
# Switch to python
(print "running in Janet")
(os/posix-exec ["python"] :p)
(print "will not print")