the function include base command like
- ls
- rm
- pwd and a buildin command "cd"
if we don't use the exit() for the parent process, the function "chdir" wouldn't make effect if we use the exit() for the parent process, there is another problem: it need exit for several times to quit.
the "cd" problem has been solved, we cann't use fork for the "cd"
Ubuntu 14.04LTS