Subversion Repositories HelenOS

Rev

Rev 4264 | Rev 4486 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4264 Rev 4266
Line 78... Line 78...
78
    /* The user has specified a full or relative path, just give it back. */
78
    /* The user has specified a full or relative path, just give it back. */
79
    if (-1 != try_access(cmd)) {
79
    if (-1 != try_access(cmd)) {
80
        return (char *) cmd;
80
        return (char *) cmd;
81
    }
81
    }
82
 
82
 
83
    path_tok = strdup(PATH);
83
    path_tok = str_dup(PATH);
84
 
84
 
85
    /* Extract the PATH env to a path[] array */
85
    /* Extract the PATH env to a path[] array */
86
    path[n] = strtok(path_tok, PATH_DELIM);
86
    path[n] = strtok(path_tok, PATH_DELIM);
87
    while (NULL != path[n]) {
87
    while (NULL != path[n]) {
88
        if ((str_size(path[n]) + x ) > PATH_MAX) {
88
        if ((str_size(path[n]) + x ) > PATH_MAX) {
Line 112... Line 112...
112
unsigned int try_exec(char *cmd, char **argv)
112
unsigned int try_exec(char *cmd, char **argv)
113
{
113
{
114
    task_id_t tid;
114
    task_id_t tid;
115
    char *tmp;
115
    char *tmp;
116
 
116
 
117
    tmp = strdup(find_command(cmd));
117
    tmp = str_dup(find_command(cmd));
118
    free(found);
118
    free(found);
119
 
119
 
120
    tid = task_spawn((const char *)tmp, argv);
120
    tid = task_spawn((const char *)tmp, argv);
121
    free(tmp);
121
    free(tmp);
122
 
122