Changeset 2443ad8 in mainline for uspace/lib/c/generic/loader.c


Ignore:
Timestamp:
2019-10-02T09:27:57Z (5 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9dcf472
Parents:
6fa3a03
git-author:
Jiri Svoboda <jiri@…> (2019-10-01 17:23:52)
git-committer:
Jiri Svoboda <jiri@…> (2019-10-02 09:27:57)
Message:

Let trace not use the loader API directly

This fixes traced binaries crashing due to missing working directory
in PCB. It should also prevent similar problems in the future.

File:
1 edited

Legend:

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

    r6fa3a03 r2443ad8  
    345345}
    346346
     347/** Instruct loader to execute the program and do not wait for reply.
     348 *
     349 * This function does not block even if the loaded task is stopped
     350 * for debugging.
     351 *
     352 * After using this function, no further operations can be performed
     353 * on the loader structure and it is deallocated.
     354 *
     355 * @param ldr Loader connection structure.
     356 *
     357 * @return Zero on success or an error code.
     358 *
     359 */
     360void loader_run_nowait(loader_t *ldr)
     361{
     362        async_exch_t *exch = async_exchange_begin(ldr->sess);
     363        async_msg_0(exch, LOADER_RUN);
     364        async_exchange_end(exch);
     365
     366        async_hangup(ldr->sess);
     367        free(ldr);
     368}
     369
    347370/** Cancel the loader session.
    348371 *
Note: See TracChangeset for help on using the changeset viewer.