Changeset 357b5f5 in mainline for uspace/app/kill/kill.c
- Timestamp:
- 2011-01-23T20:09:13Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- fdb9982c
- Parents:
- cead2aa (diff), 7e36c8d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/kill/kill.c
rcead2aa r357b5f5 1 1 /* 2 * Copyright (c) 20 09 Lukas Mejdrech2 * Copyright (c) 2010 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup arp29 /** @addtogroup kill 30 30 * @{ 31 31 */ 32 33 /** @file 34 * ARP module functions. 35 * The functions are used as ARP module entry points. 32 /** 33 * @file Forcefully terminate a task. 36 34 */ 37 35 38 #ifndef NET_ARP_MODULE_H_ 39 #define NET_ARP_MODULE_H_ 36 #include <errno.h> 37 #include <stdio.h> 38 #include <task.h> 39 #include <str_error.h> 40 40 41 #include <ipc/ipc.h> 42 #include <async.h> 41 #define NAME "kill" 43 42 44 extern int arp_initialize(async_client_conn_t); 45 extern int arp_message_standalone(ipc_callid_t, ipc_call_t *, ipc_call_t *, 46 int *); 43 static void print_syntax(void) 44 { 45 printf("Syntax: " NAME " <task ID>\n"); 46 } 47 47 48 #endif 48 int main(int argc, char *argv[]) 49 { 50 char *eptr; 51 task_id_t taskid; 52 int rc; 53 54 if (argc != 2) { 55 print_syntax(); 56 return 1; 57 } 58 59 taskid = strtoul(argv[1], &eptr, 0); 60 if (*eptr != '\0') { 61 printf("Invalid task ID argument '%s'.\n", argv[1]); 62 return 2; 63 } 64 65 rc = task_kill(taskid); 66 if (rc != EOK) { 67 printf("Failed to kill task ID %" PRIu64 ": %s\n", 68 taskid, str_error(rc)); 69 return 3; 70 } 71 72 return 0; 73 } 49 74 50 75 /** @}
Note:
See TracChangeset
for help on using the changeset viewer.