Changeset c7dc8ad in mainline for uspace/app/getvc/getvc.c


Ignore:
Timestamp:
2009-10-30T12:13:48Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e6b73ad0
Parents:
15b8e495
Message:

proof-of-concept of stdin/stdout/stderr redirection

File:
1 edited

Legend:

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

    r15b8e495 rc7dc8ad  
    7171static task_id_t spawn(char *fname)
    7272{
    73         char *argv[2];
     73        char *args[2];
    7474       
    75         argv[0] = fname;
    76         argv[1] = NULL;
     75        args[0] = fname;
     76        args[1] = NULL;
    7777       
    78         task_id_t id = task_spawn(fname, argv);
     78        task_id_t id = task_spawn(fname, args);
    7979       
    8080        if (id == 0)
     
    113113        task_id_t id = spawn(argv[2]);
    114114       
    115         task_exit_t texit;
    116         int retval;
    117         task_wait(id, &texit, &retval);
     115        if (id != 0) {
     116                task_exit_t texit;
     117                int retval;
     118                task_wait(id, &texit, &retval);
     119               
     120                return 0;
     121        }
    118122       
    119         return 0;
     123        return -5;
    120124}
    121125
Note: See TracChangeset for help on using the changeset viewer.