version 1.63, 2015/11/26 07:42:11 |
version 1.64, 2016/01/08 15:02:54 |
Line 125 mansearch_setup(int start) |
|
Line 125 mansearch_setup(int start) |
|
MAP_SHARED | MAP_ANON, -1, 0); |
MAP_SHARED | MAP_ANON, -1, 0); |
|
|
if (MAP_FAILED == pagecache) { |
if (MAP_FAILED == pagecache) { |
perror("mmap"); |
warn("mmap"); |
pagecache = NULL; |
pagecache = NULL; |
return (int)MANDOCLEVEL_SYSERR; |
return (int)MANDOCLEVEL_SYSERR; |
} |
} |
Line 144 mansearch_setup(int start) |
|
Line 144 mansearch_setup(int start) |
|
} |
} |
|
|
if (-1 == munmap(pagecache, PC_PAGESIZE * PC_NUMPAGES)) { |
if (-1 == munmap(pagecache, PC_PAGESIZE * PC_NUMPAGES)) { |
perror("munmap"); |
warn("munmap"); |
pagecache = NULL; |
pagecache = NULL; |
return (int)MANDOCLEVEL_SYSERR; |
return (int)MANDOCLEVEL_SYSERR; |
} |
} |
Line 226 mansearch(const struct mansearch *search, |
|
Line 226 mansearch(const struct mansearch *search, |
|
warnx("%s: getcwd: %s", paths->paths[i], buf); |
warnx("%s: getcwd: %s", paths->paths[i], buf); |
continue; |
continue; |
} else if (chdir(buf) == -1) { |
} else if (chdir(buf) == -1) { |
perror(buf); |
warn("%s", buf); |
continue; |
continue; |
} |
} |
} |
} |
if (chdir(paths->paths[i]) == -1) { |
if (chdir(paths->paths[i]) == -1) { |
perror(paths->paths[i]); |
warn("%s", paths->paths[i]); |
continue; |
continue; |
} |
} |
chdir_status = 1; |
chdir_status = 1; |
Line 364 mansearch(const struct mansearch *search, |
|
Line 364 mansearch(const struct mansearch *search, |
|
} |
} |
qsort(*res, cur, sizeof(struct manpage), manpage_compare); |
qsort(*res, cur, sizeof(struct manpage), manpage_compare); |
if (chdir_status && getcwd_status && chdir(buf) == -1) |
if (chdir_status && getcwd_status && chdir(buf) == -1) |
perror(buf); |
warn("%s", buf); |
exprfree(e); |
exprfree(e); |
free(sql); |
free(sql); |
*sz = cur; |
*sz = cur; |