about summary refs log tree commit diff
path: root/Src/init.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2003-11-13 14:34:33 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2003-11-13 14:34:33 +0000
commita6a63a147e4e28a1ac700938c6e7694c6de97e5d (patch)
tree57e657de4f3d4e73cad31e6fad4dabfb2112d790 /Src/init.c
parent990f7b91df5152bb7b873b7b998615744cd5d8e4 (diff)
downloadzsh-a6a63a147e4e28a1ac700938c6e7694c6de97e5d.tar.gz
zsh-a6a63a147e4e28a1ac700938c6e7694c6de97e5d.tar.xz
zsh-a6a63a147e4e28a1ac700938c6e7694c6de97e5d.zip
19242: Make job table dynamically reallocatable.
Diffstat (limited to 'Src/init.c')
-rw-r--r--Src/init.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/Src/init.c b/Src/init.c
index 0befe5e9b..b4b7e6f97 100644
--- a/Src/init.c
+++ b/Src/init.c
@@ -1207,7 +1207,7 @@ zsh_main(int argc, char **argv)
     setlocale(LC_ALL, "");
 #endif
 
-    init_hackzero(argv, environ);
+    init_jobs(argv, environ);
 
     /*
      * Provisionally set up the type table to allow metafication.
@@ -1261,6 +1261,13 @@ zsh_main(int argc, char **argv)
     init_misc();
 
     for (;;) {
+	/*
+	 * See if we can free up some of jobtab.
+	 * We only do this at top level, because if we are
+	 * executing stuff we may refer to them by job pointer.
+	 */
+	maybeshrinkjobtab();
+
 	do
 	    loop(1,0);
 	while (tok != ENDINPUT && (tok != LEXERR || isset(SHINSTDIN)));