aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-06-26 09:20:42 +0000
committerRoy Marples <roy@marples.name>2007-06-26 09:20:42 +0000
commitf9220d3e289b66c5c82c5a556e718fe43e21f3f9 (patch)
treedee7e705c82119285d0fadadd3f2b5cbe0d65397
parent0575c15993403532d96920ae443655a2deb5393e (diff)
Change pwd to / for all init scripts, #181224.
-rw-r--r--src/rc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rc.c b/src/rc.c
index 439bb7b3..0981f633 100644
--- a/src/rc.c
+++ b/src/rc.c
@@ -668,6 +668,9 @@ int main (int argc, char **argv)
atexit (cleanup);
newlevel = argv[0];
+ /* Change dir to / to ensure all scripts don't use stuff in pwd */
+ chdir ("/");
+
/* Setup a signal handler */
signal (SIGINT, handle_signal);
signal (SIGQUIT, handle_signal);