From 3b11421de7aa247267023d5fbc1b3cd9d0f4cc3e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?=
 <grubba@grubba.org>
Date: Sun, 13 Feb 2000 17:24:13 +0100
Subject: [PATCH] Kludge for low_findprog() being called when threads are
 disabled.

Rev: lib/master.pike.in:1.100
---
 lib/master.pike.in | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/lib/master.pike.in b/lib/master.pike.in
index f896f13e4b..42dbdf58fb 100644
--- a/lib/master.pike.in
+++ b/lib/master.pike.in
@@ -1,6 +1,6 @@
 /* -*- Pike -*-
  *	
- * $Id: master.pike.in,v 1.99 2000/02/10 17:57:37 hubbe Exp $
+ * $Id: master.pike.in,v 1.100 2000/02/13 16:24:13 grubba Exp $
  * 
  * Master-file for Pike.
  *
@@ -262,7 +262,13 @@ static program low_findprog(string pname, string ext, object|void handler)
   string fname=pname+ext;
 
 #ifdef THREADED
-  object key=compilation_mutex->lock(2);
+  object key;
+  // FIXME: The catch is needed, since we might be called in
+  // a context when threads are disabled.
+  // (compile() disables threads).
+  catch {
+    key=compilation_mutex->lock(2);
+  };
 #endif
 
 #ifdef PIKE_AUTORELOAD
-- 
GitLab