#include <xinu.h>
#include <string.h>
#include <stdio.h>
Go to the source code of this file.
◆ xsh_kill()
shellcmd xsh_kill |
( |
int |
nargs, |
|
|
char * |
args[] |
|
) |
| |
Definition at line 11 of file xsh_kill.c.
References fprintf(), kill(), NULLCH, OK, printf(), stderr, strncmp(), and SYSERR.
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 fprintf(int, char *,...)
#define NULLCH
NULL文字(NULL終端)