about summary refs log tree commit diff stats
path: root/popen2.h
diff options
context:
space:
mode:
Diffstat (limited to 'popen2.h')
-rw-r--r--popen2.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/popen2.h b/popen2.h
new file mode 100644
index 0000000..1805632
--- /dev/null
+++ b/popen2.h
@@ -0,0 +1,18 @@
+#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