projects
/
ghc-hetmet.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
9c86cd75c0e24da62c671dcd97fd4d4a0b4f9740
[ghc-hetmet.git]
/
ghc
/
lib
/
std
/
cbits
/
setCurrentDirectory.c
1
/*
2
* (c) The GRASP/AQUA Project, Glasgow University, 1994-1998
3
*
4
* $Id: setCurrentDirectory.c,v 1.3 1998/12/02 13:27:56 simonm Exp $
5
*
6
* setCurrentDirectory Runtime Support
7
*/
8
9
#include "Rts.h"
10
#include "stgio.h"
11
12
StgInt
13
setCurrentDirectory(path)
14
StgByteArray path;
15
{
16
while (chdir(path) != 0) {
17
if (errno != EINTR) {
18
cvtErrno();
19
stdErrno();
20
return -1;
21
}
22
}
23
return 0;
24
}