Changeset fdb9c39c in mainline for uspace/app/kill/kill.c


Ignore:
Timestamp:
2011-01-05T13:58:50Z (13 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c4faa0c
Parents:
cd22764
Message:

small improvements of the 'kill' command

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/kill/kill.c

    rcd22764 rfdb9c39c  
    3131 */
    3232/**
    33  * @file Forecfully terminate a task.
     33 * @file Forcefully terminate a task.
    3434 */
    3535
     
    3737#include <stdio.h>
    3838#include <task.h>
     39#include <str_error.h>
    3940
    40 #define NAME "kill"
     41#define NAME  "kill"
    4142
    4243static void print_syntax(void)
     
    5960        if (*eptr != '\0') {
    6061                printf("Invalid task ID argument '%s'.\n", argv[1]);
    61                 return 1;
     62                return 2;
    6263        }
    6364
    6465        rc = task_kill(taskid);
    6566        if (rc != EOK) {
    66                 printf("Failed to kill task with ID %llu (error %d)\n",
    67                     (unsigned long long) taskid, rc);
    68                 return 2;
     67                printf("Failed to kill task ID %" PRIu64 ": %s\n",
     68                    taskid, str_error(rc));
     69                return 3;
    6970        }
    7071
Note: See TracChangeset for help on using the changeset viewer.