Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset adb49f58 in mainline for uspace/app/bdsh/exec.c


Ignore:
Timestamp:
2009-07-06T20:16:15Z (12 years ago)
Author:
Jiri Svoboda <jirik.svoboda@…>
Branches:
lfn, master
Children:
95bc57c
Parents:
0315679
Message:

Allow to determine whether a task returned value before terminatign.

File:
1 edited

Legend:

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

    r0315679 radb49f58  
    113113{
    114114        task_id_t tid;
     115        task_exit_t texit;
    115116        char *tmp;
    116117        int retval;
     
    127128        }
    128129       
    129         task_wait(tid, &retval);
    130         if (retval != 0)
     130        task_wait(tid, &texit, &retval);
     131        if (texit != TASK_EXIT_NORMAL) {
     132                printf("Command failed (unexpectedly terminated).\n");
     133        } else if (retval != 0) {
    131134                printf("Command failed (return value %d).\n", retval);
     135        }
    132136
    133137        return 0;
Note: See TracChangeset for help on using the changeset viewer.