In testcases/kernel/sched/tool/time-schedule, it used kill(0, SIGTERM) to terminate the all the processes in the group. However, the progress group leader might be different regarding the different call methods. In interactive call such as pan, it called time-schedule by exec() and setpgrp() as a child process. The time-schedule process would be the process group leader and all the child processes created by it had the same PGID. So the SIGTERM was sent to process group and the exit code got by pan was 0. In non-inactive call such as STAF/STAX, one shell script called the time-schedule directly. The shell script would be the process group leader. So the SIGTERM was also sent to the shell script and the exit code got by STAF/STAX was 143 (128+15). This patch can resolve this problem.
Signed-off-by: Lin Feng Shen <shenlinf@cn.ibm.com>,
Signed-off-by: Jin Bing Guo <guojb@cn.ibm.com>.
1 file changed