Rev 3245 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3245 | Rev 3247 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | int cmd_kill(char process[]) |
1 | int cmd_kill(char param[]) |
2 | { |
2 | { |
Line 3... | Line 3... | ||
3 | 3 | ||
4 | unsigned proc; |
4 | unsigned process; |
- | 5 | int result; |
|
Line 5... | Line 6... | ||
5 | int result; |
6 | int i; |
6 | 7 | ||
7 | if (NULL == process) |
8 | if ( strlen(param) == 0 ) |
8 | { |
9 | { |
- | 10 | printf(" kill |
|
- | 11 | return TRUE; |
|
- | 12 | } |
|
- | 13 | ||
- | 14 | if (!strcmp(param, "all")) |
|
- | 15 | { |
|
- | 16 | for (i = 2;i<256;i++) |
|
- | 17 | { |
|
- | 18 | kol_kill_process(i); |
|
9 | printf(" kill |
19 | } |
10 | return FALSE; |
20 | return TRUE; |
11 | } |
21 | } |
12 | else |
22 | else |
13 | { |
23 | { |
14 | proc = _atoi(process); |
24 | process = _atoi(param); |
15 | if ( 0 != proc ) |
25 | if ( 0 != process ) |
16 | { |
26 | { |
17 | result = kol_process_kill_pid(proc); |
27 | result = kol_process_kill_pid(process); |
18 | if (result < 0) |
28 | if (result < 0) |
19 | return FALSE; |
29 | return FALSE; |
20 | else |
30 | else |
21 | return TRUE; |
31 | return TRUE; |
Line 22... | Line 32... | ||
22 | } |
32 | } |
- | 33 | } |