projects
/
util-vserver.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
28f2941
)
If /proc/sys is inaccessible, assume there are no settings.
author
Daniel Hokka Zakrisson
<daniel@hozac.com>
Mon, 25 Aug 2008 21:11:32 +0000 (21:11 +0000)
committer
Daniel Hokka Zakrisson
<daniel@hozac.com>
Mon, 25 Aug 2008 21:11:32 +0000 (21:11 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2773
94cd875c
-1c1d-0410-91d2-
eb244daf1a30
src/vsysctl.c
patch
|
blob
|
history
diff --git
a/src/vsysctl.c
b/src/vsysctl.c
index
ca022a1
..
c5bca13
100644
(file)
--- a/
src/vsysctl.c
+++ b/
src/vsysctl.c
@@
-157,7
+157,8
@@
int main(int argc, char *argv[])
DIR *dp;
struct dirent *de;
- Echdir(PROC_SYS_DIRECTORY);
+ if (chdir(PROC_SYS_DIRECTORY) == -1)
+ goto exec;
dp = opendir(dir);
if (dp != NULL) {
@@
-176,6
+177,7
@@
int main(int argc, char *argv[])
Efchdir(curdir);
}
+exec:
Eexecvp(argv[optind], argv+optind);
return EXIT_FAILURE;
}