Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/libc.c

    r3292623 r63f8966  
    6262void __main(void *pcb_ptr)
    6363{
    64         /* Initialize user task run-time environment */
     64        int retval;
     65
    6566        __heap_init();
    6667        __async_init();
     
    7475        char **argv;
    7576       
    76         /* Get command line arguments and initialize
    77            standard input and output */
    7877        if (__pcb == NULL) {
    7978                argc = 0;
     
    8786        }
    8887       
    89         /* Run main() and set task return value
    90            according the result */
    91         (void) task_retval(main(argc, argv));
     88        retval = main(argc, argv);
     89
     90        __stdio_done();
     91        (void) task_retval(retval);
    9292}
    9393
    9494void __exit(void)
    9595{
    96         __stdio_done();
    9796        fibril_teardown(__tcb_get()->fibril_data);
    9897        _exit(0);
Note: See TracChangeset for help on using the changeset viewer.