projects
/
ghc-hetmet.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
[project @ 1998-02-02 16:47:53 by simonm]
[ghc-hetmet.git]
/
ghc
/
lib
/
cbits
/
setCurrentDirectory.lc
1
%
2
% (c) The GRASP/AQUA Project, Glasgow University, 1995
3
%
4
\subsection[setCurrentDirectory.lc]{setCurrentDirectory Runtime Support}
5
6
\begin{code}
7
8
#include "rtsdefs.h"
9
#include "stgio.h"
10
11
StgInt
12
setCurrentDirectory(path)
13
StgByteArray path;
14
{
15
while (chdir(path) != 0) {
16
if (errno != EINTR) {
17
cvtErrno();
18
stdErrno();
19
return -1;
20
}
21
}
22
return 0;
23
}
24
25
\end{code}