summaryrefslogtreecommitdiff
path: root/userspace/xterm/xterm.c
diff options
context:
space:
mode:
authorMiguel <m.i@gmx.at>2018-10-09 10:31:33 +0200
committerMiguel <m.i@gmx.at>2018-10-09 10:31:33 +0200
commita6a11437a390fb7e95fe995214d82bf5dbfe1eaf (patch)
tree2e45b4c1cee8a1ecb70cd773185154448e7f7ab0 /userspace/xterm/xterm.c
parentfe8180d88540bfa96595dcc58290de5425e534e3 (diff)
something wrnog with our pipes
Diffstat (limited to 'userspace/xterm/xterm.c')
-rw-r--r--userspace/xterm/xterm.c7
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];