diff options
| author | Miguel <m.i@gmx.at> | 2018-09-21 12:56:51 +0200 |
|---|---|---|
| committer | Miguel <m.i@gmx.at> | 2018-09-21 12:56:51 +0200 |
| commit | c298ca7e6beaad0bcc32af6d4cf50d41b79f13b7 (patch) | |
| tree | b28e9c052cff3264439cad3c41b29262c60ba6ac /userspace/piper.c | |
| parent | f5281689c95758f17628f0286e0265ecf3385a8e (diff) | |
fix framebufffer/ textmode and clean userspace a little bit more
Diffstat (limited to 'userspace/piper.c')
| -rw-r--r-- | userspace/piper.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/userspace/piper.c b/userspace/piper.c deleted file mode 100644 index 80cbd27..0000000 --- a/userspace/piper.c +++ /dev/null @@ -1,27 +0,0 @@ -#include <stdio.h> -#include "newcalls.h" - -extern **environ; - -int main() -{ - int fds[2]; - _pipe(fds); - - int pid=_fork(); - - if(pid) - { - _close(fds[1]); - _dup2(fds[0],0); // replace stdin with the read-end of pipe - char *args[]={"grep",NULL}; - _execve("/bin/grep",args,environ); - } - else - { - _close(fds[0]); - _dup2(fds[1],1); // replace stdout with the write-end of our pipe - char *args[]={"cat","hello.txt",0}; - _execve("/bin/cat",args,environ); - } -} |
