diff options
author | login | 2024-10-13 06:28:05 +0000 |
---|---|---|
committer | login | 2024-10-13 06:28:05 +0000 |
commit | 7a61538fea92622e1182cd55d5fa8316c86265eb (patch) | |
tree | 10ccb7d7c18faa537d3ef434116f6f04cb6ee66a /popen2.h | |
parent | c0fc6ecbd6e3f8ead4a845e7d9486e3f04185b9e (diff) |
Fixed tcoin code1 and tcoin code2 leak, and refactored file permissions into a preprocessor macro
Fixed issue with tcoin code1 and tcoin code2. Now they're sent via stdin instead of as arguments to tcoin. Refactored file permissions into a preprocessor macro.
Diffstat (limited to 'popen2.h')
-rw-r--r-- | popen2.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/popen2.h b/popen2.h index 1805632..f0de0a3 100644 --- a/popen2.h +++ b/popen2.h @@ -0,0 +1,17 @@ +#ifndef _IXIMIUZ_POPEN2 +#define _IXIMIUZ_POPEN2 + +#include<stdio.h> +//https://github.com/iximiuz/popen2 +//https://iximiuz.com/en/posts/how-to-on-processes/ + +struct files_t { + FILE *in; + FILE *out; +}; + +struct files_t *popen2(const char *command); + +int pclose2(struct files_t *fp); + +#endif // _IXIMIUZ_POPEN2 |