Changed parse_path_string() to make sure that get_wd is called so that
authorMark Friedman <edu/mit/csail/zurich/markf>
Tue, 8 Oct 1991 21:42:37 +0000 (21:42 +0000)
committerMark Friedman <edu/mit/csail/zurich/markf>
Tue, 8 Oct 1991 21:42:37 +0000 (21:42 +0000)
the unix getcwd is called now, before it allocates heap space. This is
because getcwd forks off a new process and we want to do that before
the scheme process gets too big.

v7/src/microcode/option.c

index 9db4439387b9395736c7466ecb16d5e43af11945..516ca602f5210c026aa9aad4921d1c46bf546eea 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/option.c,v 1.9 1991/09/07 22:31:09 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/option.c,v 1.10 1991/10/08 21:42:37 markf Exp $
 
 Copyright (c) 1990-1991 Massachusetts Institute of Technology
 
@@ -659,7 +659,12 @@ static CONST char **
 DEFUN (parse_path_string, (path), CONST char * path)
 {
   CONST char * start = path;
-  CONST char * wd = 0;
+  /* It is important that this get_wd be called here to make sure that
+     the the unix getcwd is called now, before it allocates heap space
+     This is because getcwd forks off a new process and we want to do
+     that before the scheme process gets too big
+  */
+  CONST char * wd = get_wd();
   unsigned int lwd;
   while (1)
     {