学生实现他们自己的带有作业控制的Unix Shell程序,包括Ctrl + C和Ctrl + Z按键,fg,bg,和 jobs命令。这是学生第一次接触并发,并且让他们对Unix的进程控制、信号和信号处理有清晰的了解。什么是Shell?
Evaluate the command line that the user has just typed in.
If the user has typed a built-in command then execute it immediately.
Execute the builtin bg and fg commands.
Block until process pid is no longer the foreground process
pid_t waitpid(pid_t pid, int *statusp, int options);pid:判定等待集合的成员
This is a little tricky. Block SIGCHLD, SIGINT, and SIGTSTP signals until we can add the job to the job list. This eliminates some nasty races between adding a job to the job list and the arrival of SIGCHLD, SIGINT, and SIGTSTP signals.注意
欢迎光临 IT评测·应用市场-qidao123.com技术社区 (https://dis.qidao123.com/) | Powered by Discuz! X3.4 |