-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using janet_dostring with os/execute evaluates to nil #1307
Comments
iacore
changed the title
Using janet_dostring with sh/exec-slurp fail to evaluate.
Using janet_dostring with sh/exec-slurp evaluates to nil
Oct 12, 2023
May be it's not spork as compiling and executing the following: // build:
//
// gcc -O0 -g main.c -I$HOME/.local/include -L$HOME/.local/lib -ljanet
// run:
//
// export LD_LIBRARY_PATH=$HOME/.local/lib
// ./a.out
#include "janet.h"
#include <stdio.h>
int main() {
JanetTable *env;
janet_init();
env = janet_core_env(NULL);
int status;
Janet out;
status =
janet_dostring(env,
"(os/execute [`ls`] :px)",
"source", &out);
printf("os/execute status: %d\n", status);
janet_gcroot(out);
printf("janet_type: %d\n", janet_type(out));
printf("\n");
janet_deinit();
} ends with the output:
The expected output is:
That is, I expect a number
|
iacore
changed the title
Using janet_dostring with sh/exec-slurp evaluates to nil
Using janet_dostring with os/execute evaluates to nil
Oct 12, 2023
e3f4142 seems to have fixed this. Can no longer reproduce. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reproduction: https://gist.github.com/iacore/6acbb2d98403e468c35dd835518b9be5
Related to #926
This may be a spork bug or a janet bug.
The text was updated successfully, but these errors were encountered: