If fchdir() fails, call err() instead of warn().

This commit is contained in:
Don Lewis 2016-05-12 23:37:58 +00:00
parent 3694294ca5
commit 52af39633a

View File

@ -613,7 +613,7 @@ static void
process_mandir(char *dir_name, char *section)
{
if (fchdir(starting_dir) < 0)
warn("fchdir");
err(1, "fchdir");
if (already_visited(NULL, dir_name, section == NULL))
return;
check_writable(dir_name);