diff options
Diffstat (limited to 'userspace/foolshell.c')
| -rw-r--r-- | userspace/foolshell.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/userspace/foolshell.c b/userspace/foolshell.c index 3a87158..da05e96 100644 --- a/userspace/foolshell.c +++ b/userspace/foolshell.c @@ -45,6 +45,7 @@ int main(int argc, char **argv) if(!silent)hello(); char *buf=malloc(256); + // printf("malloc returned: 0x%08X\n",buf); while(1) { @@ -87,8 +88,6 @@ char **tokenize(char *buf) i++; } token[c][t]=0; - - // printf("token %i : <%s>\n",c, token[c]); c++; @@ -216,15 +215,17 @@ int process(char *buf) int pid=fork(); if(pid!=0) { - //printf("new task pid: %i \n",pid); + printf("new task pid: %i \n",pid); } if(pid==0) { char buf[256]; sprintf(buf,"%s",token[0]); execve(buf,token,environ); - sprintf(buf,"%s/%s",getenv("PATH"),token[0]); + //sprintf(buf,"%s/%s",getenv("PATH"),token[0]); + sprintf(buf,"%s/%s","/bin",token[0]); execve(buf,token,environ); + puts("foolshell: command not found"); exit(1); } |
