Use open(".")/fchdir() to save and restore current directory rather than

getcwd()/chdir().
This commit is contained in:
Nicholas Marriott
2013-10-05 09:14:11 +01:00
parent 13360ad541
commit d51b4f92d7
2 changed files with 11 additions and 5 deletions

View File

@ -135,7 +135,7 @@ error:
return (NULL);
}
char*
char *
osdep_get_cwd(int fd)
{
int name[] = { CTL_KERN, KERN_PROC_CWD, 0 };