~ubuntu-branches/ubuntu/maverick/slurm-llnl/maverick

« back to all changes in this revision

Viewing changes to src/plugins/proctrack/linuxproc/kill_tree.c

  • Committer: Bazaar Package Importer
  • Author(s): Gennaro Oliva
  • Date: 2010-06-12 05:53:11 UTC
  • mfrom: (3.3.5 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100612055311-stk5us3zxdty9dq3
Tags: 2.1.9-1
New upstream release 

Show diffs side-by-side

added added

removed removed

Lines of Context:
144
144
        return 0;
145
145
}
146
146
 
147
 
static xppid_t **_build_hashtbl()
 
147
static xppid_t **_build_hashtbl(void)
148
148
{
149
149
        DIR *dir;
150
150
        struct dirent *de;
165
165
 
166
166
        while ((de = readdir(dir)) != NULL) {
167
167
                num = de->d_name;
 
168
                if ((num[0] < '0') || (num[0] > '9'))
 
169
                        continue;
168
170
                ret_l = strtol(num, &endptr, 10);
169
 
                if(errno == ERANGE)
 
171
                if(errno == ERANGE) {
170
172
                        error("couldn't do a strtol on str %s(%d): %m",
171
173
                              num, ret_l);
172
 
 
 
174
                }
173
175
                if (endptr == NULL || *endptr != 0)
174
176
                        continue;
175
177
                sprintf(path, "/proc/%s/stat", num);