Changeset b40bfac in mainline for uspace/app/redir/redir.c


Ignore:
Timestamp:
2010-11-08T07:13:25Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
63a1e60
Parents:
d70a463 (diff), 3da12d74 (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.
Message:

Merge mainline changes

File:
1 edited

Legend:

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

    rd70a463 rb40bfac  
    4343#include <task.h>
    4444#include <str_error.h>
     45#include <errno.h>
    4546
    4647#define NAME  "redir"
     
    7677static task_id_t spawn(int argc, char *argv[])
    7778{
    78         const char **args = (const char **) calloc(argc + 1, sizeof(char *));
     79        const char **args;
     80        task_id_t id;
     81        int rc;
     82
     83        args = (const char **) calloc(argc + 1, sizeof(char *));
    7984        if (!args) {
    8085                printf("No memory available\n");
     
    8893        args[argc] = NULL;
    8994       
    90         int err;
    91         task_id_t id = task_spawn(argv[0], args, &err);
     95        rc = task_spawnv(&id, argv[0], args);
    9296       
    9397        free(args);
    9498       
    95         if (id == 0)
     99        if (rc != EOK) {
    96100                printf("%s: Error spawning %s (%s)\n", NAME, argv[0],
    97                     str_error(err));
     101                    str_error(rc));
     102        }
    98103       
    99104        return id;
Note: See TracChangeset for help on using the changeset viewer.