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


Ignore:
Timestamp:
2017-03-07T20:47:35Z (7 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a737667e
Parents:
e796dc8
git-author:
Jiri Zarevucky <zarevucky.jiri@…> (2017-03-07 20:47:35)
git-committer:
Jakub Jermar <jakub@…> (2017-03-07 20:47:35)
Message:

Merge from lp:~zarevucky-jiri/helenos/vfs-2.5/ revision 1941-1944

Original commit messages:

1944: Jiri Zarevucky 2013-08-06 Replace legacy file descriptor presetting with inbox.
1943: Jiri Zarevucky 2013-08-06 Do not preserve open state when passing file descriptor to another task. Allow receiver to specify, whether the descriptor is low or high.
1942: Jiri Zarevucky 2013-08-06 C style.
1941: Jiri Zarevucky 2013-08-06 Make loader accept file reference instead of a pathname.

Modifications:

  • Keep version of elf_load_file() that accepts file name
  • Changes required for loading dynamically linked executables
  • Update to newer list_foreach
File:
1 edited

Legend:

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

    re796dc8 rbb9ec2d  
    101101        char *tmp;
    102102        int rc, retval, i;
    103         int file_handles[3];
    104         int *file_handles_p[4];
     103        int file_handles[3] = { -1, -1, -1 };
    105104        FILE *files[3];
    106105
     
    113112       
    114113        for (i = 0; i < 3 && files[i] != NULL; i++) {
    115                 if (vfs_fhandle(files[i], &file_handles[i]) == EOK) {
    116                         file_handles_p[i] = &file_handles[i];
    117                 }
    118                 else {
    119                         file_handles_p[i] = NULL;
    120                 }
     114                vfs_fhandle(files[i], &file_handles[i]);
    121115        }
    122         file_handles_p[i] = NULL;
    123116
    124         rc = task_spawnvf(&tid, &twait, tmp, (const char **) argv, file_handles_p);
     117        rc = task_spawnvf(&tid, &twait, tmp, (const char **) argv,
     118            file_handles[0], file_handles[1], file_handles[2]);
    125119        free(tmp);
    126120
Note: See TracChangeset for help on using the changeset viewer.