Changeset 2651dc5 in mainline for uspace/app/nav/panel.c


Ignore:
Timestamp:
2021-10-20T22:22:04Z (2 years ago)
Author:
Jiri Svoboda <jiri@…>
Children:
966a27d3
Parents:
08d5f8b
Message:

Unmap and clear console before executing a binary

Fixes running edit, nav, improves fdisk, etc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/nav/panel.c

    r08d5f8b r2651dc5  
    10791079        int retval;
    10801080        errno_t rc;
     1081        ui_t *ui;
    10811082
    10821083        /* It's not a directory */
     
    10851086        assert(entry->svc == 0);
    10861087
     1088        ui = ui_window_get_ui(panel->window);
     1089
     1090        /* Free up and clean console for the child task. */
     1091        rc = ui_suspend(ui);
     1092        if (rc != EOK)
     1093                return rc;
     1094
    10871095        rc = task_spawnl(&id, &wait, entry->name, entry->name, NULL);
    10881096        if (rc != EOK)
    1089                 return rc;
     1097                goto error;
    10901098
    10911099        rc = task_wait(&wait, &texit, &retval);
    10921100        if ((rc != EOK) || (texit != TASK_EXIT_NORMAL))
     1101                goto error;
     1102
     1103        /* Resume UI operation */
     1104        rc = ui_resume(ui);
     1105        if (rc != EOK)
    10931106                return rc;
    10941107
    10951108        (void) ui_paint(ui_window_get_ui(panel->window));
    10961109        return EOK;
     1110error:
     1111        (void) ui_resume(ui);
     1112        (void) ui_paint(ui_window_get_ui(panel->window));
     1113        return rc;
    10971114}
    10981115
Note: See TracChangeset for help on using the changeset viewer.