20 if (nargs == 2 &&
strncmp(args[1],
"--help", 7) == 0) {
21 printf(
"Usage: %s PID\n\n", args[0]);
23 printf(
"\tterminates a process\n");
25 printf(
"\tPID \tthe ID of a process to terminate\n");
26 printf(
"\t--help\tdisplay this help and exit\n");
45 if ( (ch <
'0') || (ch >
'9') ) {
50 pid = 10*pid + (ch -
'0');
int32 strncmp(const char *, const char *, int32)
int32 printf(const char *,...)
syscall kill(pid32)
指定のプロセスを終了させ、システムから終了させたプロセス情報を取り除く。
int int32
符号あり32ビット整数(int)
int32 shellcmd
シェルコール関数 返り値の型
int32 fprintf(int, char *,...)
shellcmd xsh_kill(int nargs, char *args[])
#define NULLCH
NULL文字(NULL終端)