summary refs log tree commit diff
path: root/src/main.h
diff options
context:
space:
mode:
authorherbert <herbert@gondor.apana.org.au>2005-02-25 20:49:13 +1100
committerHerbert Xu <herbert@gondor.apana.org.au>2005-09-26 18:33:03 +1000
commite994ac70a4d85cd933e674e0df70301dd86637ee (patch)
tree0b61fe1663a448911aac3b3a775f0e433c73d024 /src/main.h
parentRelease 0.5.2. (diff)
downloaddash-e994ac70a4d85cd933e674e0df70301dd86637ee.tar.gz
dash-e994ac70a4d85cd933e674e0df70301dd86637ee.zip
Changed boolean rootshell into shlvl counter.
Diffstat (limited to 'src/main.h')
-rw-r--r--src/main.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main.h b/src/main.h
index c305ab7..6b8e71c 100644
--- a/src/main.h
+++ b/src/main.h
@@ -42,8 +42,10 @@
 
 /* pid of main shell */
 extern int rootpid;
-/* true if we aren't a child of the main shell */
-extern int rootshell;
+/* shell level: 0 for the main shell, 1 for its children, and so on */
+extern int shlvl;
+#define rootshell (!shlvl)
+
 #ifdef __GLIBC__
 /* glibc sucks */
 extern int *dash_errno;