![]() | Fun 0.41.5 The programming language that makes You have fun |
Implements OP_PROC_RUN to execute a shell command and capture stdout. More...
#include <stdio.h>#include <stdlib.h>#include <string.h>
Go to the source code of this file.
Functions | |
| free_value (cmdv) | |
| if (!cmd) | |
| if (fp) | |
| map_set & | m (out ? out :"") |
| map_set & | m (exit_code) |
| push_value (vm, m) | |
| free (cmd) | |
Variables | |
| case | OP_PROC_RUN |
| char * | cmd = value_to_string_alloc(&cmdv) |
| FILE * | fp = popen(cmd, "r") |
| int | exit_code = -1 |
| char * | out = NULL |
| size_t | cap = 0 |
| size_t | len = 0 |
| else | |
| Value | m = make_map_empty() |
| done_push | __pad0__ |
| break | |
Implements OP_PROC_RUN to execute a shell command and capture stdout.
Behavior:
Errors:
Definition in file proc_run.c.
| free | ( | cmd | ) |

| free_value | ( | cmdv | ) |
| if | ( | ! | cmd | ) |
| if | ( | fp | ) |
| push_value | ( | vm | , |
| m | ) |

| done_push __pad0__ |
Definition at line 99 of file proc_run.c.
| break |
Definition at line 102 of file proc_run.c.
| size_t cap = 0 |
Definition at line 47 of file proc_run.c.
| char* cmd = value_to_string_alloc(&cmdv) |
Definition at line 33 of file proc_run.c.
| else |
Definition at line 89 of file proc_run.c.
| exit_code = -1 |
Definition at line 45 of file proc_run.c.
| FILE* fp = popen(cmd, "r") |
Definition at line 44 of file proc_run.c.
| size_t len = 0 |
Definition at line 47 of file proc_run.c.
| Value m = make_map_empty() |
Definition at line 94 of file proc_run.c.
| case OP_PROC_RUN |
Definition at line 30 of file proc_run.c.
| char* out = NULL |
Definition at line 46 of file proc_run.c.