mirror of
https://github.com/janet-lang/janet
synced 2025-11-13 13:57:19 +00:00
Add :a option to os/execute, and allow redirecting stdio.
This should help cover a number of common cases for use of subprocesses. This should also eventually work well with the ev branch via
This commit is contained in:
@@ -162,8 +162,8 @@ static Janet cfun_io_fopen(int32_t argc, Janet *argv) {
|
||||
}
|
||||
FILE *f = fopen((const char *)fname, (const char *)fmode);
|
||||
return f ? janet_makefile(f, flags)
|
||||
: (flags & JANET_FILE_NONIL) ? (janet_panicf("failed to open file %s: %s", fname, strerror(errno)), janet_wrap_nil())
|
||||
: janet_wrap_nil();
|
||||
: (flags & JANET_FILE_NONIL) ? (janet_panicf("failed to open file %s: %s", fname, strerror(errno)), janet_wrap_nil())
|
||||
: janet_wrap_nil();
|
||||
}
|
||||
|
||||
/* Read up to n bytes into buffer. */
|
||||
|
||||
Reference in New Issue
Block a user