diff options
| author | Miguel <m.i@gmx.at> | 2018-10-09 10:31:33 +0200 |
|---|---|---|
| committer | Miguel <m.i@gmx.at> | 2018-10-09 10:31:33 +0200 |
| commit | a6a11437a390fb7e95fe995214d82bf5dbfe1eaf (patch) | |
| tree | 2e45b4c1cee8a1ecb70cd773185154448e7f7ab0 /userspace/xterm/xterm.c | |
| parent | fe8180d88540bfa96595dcc58290de5425e534e3 (diff) | |
something wrnog with our pipes
Diffstat (limited to 'userspace/xterm/xterm.c')
| -rw-r--r-- | userspace/xterm/xterm.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/userspace/xterm/xterm.c b/userspace/xterm/xterm.c index 96389a9..31feea7 100644 --- a/userspace/xterm/xterm.c +++ b/userspace/xterm/xterm.c @@ -16,6 +16,7 @@ int main() int pid=_fork(); + if(!pid) { _close(xterm_in[1]); @@ -25,9 +26,13 @@ int main() _dup2(xterm_out[1],1);// stdout _dup2(xterm_out[1],2);// stderr + while(1); + char *argv1[]={"/bin/fsh",0}; char *env1[]={"HOME=/home/miguel","PS1=\033[34m$\033[37m","PWD=/home/miguel","PATH=/bin","TERM=fool-term",0}; + while(1); + _execve("/bin/fsh",argv1,env1); // replace process with our foolshell :) } @@ -36,6 +41,8 @@ int main() _dup2(xterm_in[1],1); // compositor writes here. + while(1); + while(1) { char buf[1]; |
