Changeset 0485135 in mainline for uspace/app/getterm/getterm.c


Ignore:
Timestamp:
2010-11-05T19:53:00Z (13 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0b81cad0
Parents:
a66e2993
Message:

For more convenience, replace task_spawn() with task_spawnv() and task_spawnl().

File:
1 edited

Legend:

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

    ra66e2993 r0485135  
    4141#include <task.h>
    4242#include <str_error.h>
     43#include <errno.h>
    4344#include "version.h"
    4445
     
    7475static task_id_t spawn(const char *fname)
    7576{
    76         const char *args[2];
     77        task_id_t id;
     78        int rc;
    7779       
    78         args[0] = fname;
    79         args[1] = NULL;
    80        
    81         int err;
    82         task_id_t id = task_spawn(fname, args, &err);
    83        
    84         if (id == 0)
     80        rc = task_spawnl(&id, fname, fname, NULL);
     81        if (rc != EOK) {
    8582                printf("%s: Error spawning %s (%s)\n", APP_NAME, fname,
    86                     str_error(err));
     83                    str_error(rc));
     84                return 0;
     85        }
    8786       
    8887        return id;
Note: See TracChangeset for help on using the changeset viewer.