Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/exec.c

    r19f857a rd9fae235  
    4040#include <str.h>
    4141#include <fcntl.h>
     42#include <str_error.h>
    4243
    4344#include "config.h"
     
    120121        free(found);
    121122
    122         tid = task_spawn(tmp, (const char **) argv);
     123        tid = task_spawn(tmp, (const char **) argv, &retval);
    123124        free(tmp);
    124125
    125126        if (tid == 0) {
    126                 cli_error(CL_EEXEC, "Cannot spawn `%s'.", cmd);
     127                cli_error(CL_EEXEC, "%s: Cannot spawn `%s' (%s)", progname, cmd,
     128                    str_error(retval));
    127129                return 1;
    128130        }
     
    130132        task_wait(tid, &texit, &retval);
    131133        if (texit != TASK_EXIT_NORMAL) {
    132                 printf("Command failed (unexpectedly terminated).\n");
     134                printf("%s: Command failed (unexpectedly terminated)\n", progname);
    133135        } else if (retval != 0) {
    134                 printf("Command failed (return value %d).\n", retval);
     136                printf("%s: Command failed (%s)\n",
     137                    progname, str_error(retval));
    135138        }
    136139
Note: See TracChangeset for help on using the changeset viewer.