~martin-decky/helenos/rcu

« back to all changes in this revision

Viewing changes to uspace/app/bdsh/exec.c

  • Committer: Jakub Jermar
  • Date: 2011-08-19 08:58:50 UTC
  • mfrom: (1143.1.18 HelenOS.camp2011)
  • Revision ID: jakub@jermar.eu-20110819085850-kt1aho3ugtqnuqi3
MergeĀ fromĀ lp:~jakub/helenos/camp2011.

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
#include <fcntl.h>
40
40
#include <str_error.h>
41
41
#include <errno.h>
 
42
#include <vfs/vfs.h>
42
43
 
43
44
#include "config.h"
44
45
#include "util.h"
98
99
        task_exit_t texit;
99
100
        char *tmp;
100
101
        int rc, retval, i;
101
 
        fdi_node_t file_nodes[3];
102
 
        fdi_node_t *file_nodes_p[4];
 
102
        int file_handles[3];
 
103
        int *file_handles_p[4];
103
104
        FILE *files[3];
104
105
 
105
106
        tmp = str_dup(find_command(cmd));
110
111
        files[2] = io->stderr;
111
112
        
112
113
        for (i = 0; i < 3 && files[i] != NULL; i++) {
113
 
                if (fnode(files[i], &file_nodes[i]) == EOK) {
114
 
                        file_nodes_p[i] = &file_nodes[i];
 
114
                if (fhandle(files[i], &file_handles[i]) == EOK) {
 
115
                        file_handles_p[i] = &file_handles[i];
115
116
                }
116
117
                else {
117
 
                        file_nodes_p[i] = NULL;
 
118
                        file_handles_p[i] = NULL;
118
119
                }
119
120
        }
120
 
        file_nodes_p[i] = NULL;
 
121
        file_handles_p[i] = NULL;
121
122
 
122
 
        rc = task_spawnvf(&tid, tmp, (const char **) argv, file_nodes_p);
 
123
        rc = task_spawnvf(&tid, tmp, (const char **) argv, file_handles_p);
123
124
        free(tmp);
124
125
 
125
126
        if (rc != 0) {