Rev 3287 | Rev 3304 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3287 | Rev 3298 | ||
---|---|---|---|
Line 49... | Line 49... | ||
49 | #include "config.h" |
49 | #include "config.h" |
50 | #include "util.h" |
50 | #include "util.h" |
51 | #include "exec.h" |
51 | #include "exec.h" |
52 | #include "errors.h" |
52 | #include "errors.h" |
53 | 53 | ||
54 | /* Easiest way to handle a shared + allocated string, a structure with |
54 | /* TODO: create exec, exev, execve wrappers for task_spawn() */ |
- | 55 | ||
55 | * one member is sort of silly :) */ |
56 | /* Easiest way to handle a shared + allocated string */ |
56 | char *found; |
57 | char *found; |
57 | 58 | ||
58 | /* work-around for access() */ |
59 | /* work-around for access() */ |
59 | unsigned int try_access(const char *f) |
60 | unsigned int try_access(const char *f) |
60 | { |
61 | { |
Line 139... | Line 140... | ||
139 | char *tmp; |
140 | char *tmp; |
140 | 141 | ||
141 | tmp = cli_strdup(find_command(cmd)); |
142 | tmp = cli_strdup(find_command(cmd)); |
142 | free(found); |
143 | free(found); |
143 | 144 | ||
- | 145 | /* TODO: put the cwd in front of tmp if tmp[0] != root |
|
- | 146 | * which fixes relative paths fed to task_spawn */ |
|
- | 147 | ||
144 | tid = task_spawn((const char *)tmp, (const char **)argv); |
148 | tid = task_spawn((const char *)tmp, (const char **)argv); |
145 | free(tmp); |
149 | free(tmp); |
146 | 150 | ||
147 | if (tid == 0) |
151 | if (tid == 0) |
148 | /* HelenOS does not set errno, so all we can do is report |
152 | /* HelenOS does not set errno, so all we can do is report |