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