Changeset 7114d83 in mainline for uspace/app


Ignore:
Timestamp:
2009-07-06T16:02:27Z (17 years ago)
Author:
Jiri Svoboda <jirik.svoboda@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5d96851b
Parents:
d68e4d5
Message:

Allow task to return value (will be improved).

Location:
uspace/app
Files:
2 edited

Legend:

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

    rd68e4d5 r7114d83  
    114114        task_id_t tid;
    115115        char *tmp;
     116        int retval;
    116117
    117118        tmp = str_dup(find_command(cmd));
     
    126127        }
    127128       
    128         task_wait(tid);
     129        task_wait(tid, &retval);
     130        if (retval != 0)
     131                printf("Command failed (return value %d).\n", retval);
     132
    129133        return 0;
    130134}
  • uspace/app/getvc/getvc.c

    rd68e4d5 r7114d83  
    7474int main(int argc, char *argv[])
    7575{
     76        int retval;
     77
    7678        if (argc < 3) {
    7779                usage();
     
    98100        version_print(argv[1]);
    99101        task_id_t id = spawn(argv[2]);
    100         task_wait(id);
     102        task_wait(id, &retval);
    101103       
    102104        return 0;
Note: See TracChangeset for help on using the changeset viewer.