Changeset 55fe220 in mainline


Ignore:
Timestamp:
2019-08-07T04:56:41Z (5 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Children:
d4ec49e
Parents:
5044114
git-author:
Michal Koutný <xm.koutny+hos@…> (2015-10-12 22:21:42)
git-committer:
Matthieu Riolo <matthieu.riolo@…> (2019-08-07 04:56:41)
Message:

taskman: Modify existing callers of task_wait API
Conflicts:

uspace/app/bdsh/exec.c
uspace/app/getterm/getterm.c
uspace/app/sbi/src/os/helenos.c
uspace/app/vlaunch/vlaunch.c
uspace/lib/pcut/src/os/helenos.c
uspace/srv/hid/remcons/remcons.c

Location:
uspace
Files:
6 edited

Legend:

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

    r5044114 r55fe220  
    141141        }
    142142
     143        task_wait_set(&twait, TASK_WAIT_EXIT | TASK_WAIT_RETVAL);
    143144        rc = task_spawnvf(&tid, &twait, tmp, (const char **) argv,
    144145            file_handles[0], file_handles[1], file_handles[2]);
  • uspace/app/getterm/getterm.c

    r5044114 r55fe220  
    169169        task_id_t id;
    170170        task_wait_t twait;
     171        task_wait_set(&twait, TASK_WAIT_EXIT);
     172        errno_t rc = task_spawnv(&id, &twait, cmd, (const char *const *) args);
    171173
    172         errno_t rc = task_spawnv(&id, &twait, cmd, (const char *const *) args);
    173174        if (rc != EOK) {
    174175                printf("%s: Error spawning %s (%s)\n", APP_NAME, cmd,
     
    176177                return rc;
    177178        }
    178 
    179         task_exit_t texit;
    180         int retval;
    181         rc = task_wait(&twait, &texit, &retval);
     179       
     180        rc = task_wait(&twait, NULL, NULL);
    182181        if (rc != EOK) {
    183182                printf("%s: Error waiting for %s (%s)\n", APP_NAME, cmd,
  • uspace/app/sbi/src/os/helenos.c

    r5044114 r55fe220  
    255255        int retval;
    256256
     257        task_wait_set(&twait, TASK_WAIT_EXIT);
    257258        rc = task_spawnv(&tid, &twait, cmd[0], (char const *const *) cmd);
    258259        if (rc != EOK) {
     
    263264
    264265        /* XXX Handle exit status and return value. */
    265         rc = task_wait(&twait, &texit, &retval);
     266        rc = task_wait(&twait, NULL, NULL);
    266267        (void) rc;
    267268
  • uspace/app/vlaunch/vlaunch.c

    r5044114 r55fe220  
    6666        task_id_t id;
    6767        task_wait_t wait;
     68        task_wait_set(&wait, TASK_WAIT_RETVAL);
    6869        errno_t rc = task_spawnl(&id, &wait, app, app, winreg, NULL);
    6970        if (rc != EOK) {
     
    7273                return -1;
    7374        }
    74 
    75         task_exit_t texit;
     75       
    7676        int retval;
    77         rc = task_wait(&wait, &texit, &retval);
    78         if ((rc != EOK) || (texit != TASK_EXIT_NORMAL)) {
     77        rc = task_wait(&wait, NULL, &retval);
     78        if ((rc != EOK)) {
    7979                printf("%s: Error retrieving retval from %s (%s)\n", NAME,
    8080                    app, str_error(rc));
  • uspace/lib/pcut/src/os/helenos.c

    r5044114 r55fe220  
    176176
    177177        task_wait_t test_task_wait;
     178        task_wait_set(&test_task_wait, TASK_WAIT_EXIT | TASK_WAIT_RETVAL);
    178179        rc = task_spawnvf(&test_task_id, &test_task_wait, self_path, arguments,
    179180            fileno(stdin), tempfile, tempfile);
  • uspace/srv/hid/remcons/remcons.c

    r5044114 r55fe220  
    239239        task_id_t task;
    240240        task_wait_t wait;
     241        task_wait_set(&wait, TASK_WAIT_EXIT | TASK_WAIT_RETVAL);
    241242        errno_t rc = task_spawnl(&task, &wait, APP_GETTERM, APP_GETTERM, user->service_name,
    242243            "/loc", "--msg", "--", APP_SHELL, NULL);
Note: See TracChangeset for help on using the changeset viewer.