summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--Src/parse.c7
2 files changed, 12 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 9ccfc461b..e51e5c47d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-09-04  Peter Stephenson  <p.w.stephenson@ntlworld.com>
+
+	* 41633: Src/parse.c: make sure function definitions including
+	anonymous functions put into the background are run in the
+	background.
+
 2017-09-04  Daniel Shahaf  <d.s@daniel.shahaf.name>
 
 	* 41621: Completion/Unix/Command/_mkdir: Honour the 'command'
diff --git a/Src/parse.c b/Src/parse.c
index 27052527d..6e0856bbc 100644
--- a/Src/parse.c
+++ b/Src/parse.c
@@ -808,8 +808,13 @@ par_sublist(int *cmplx)
 				 WC_SUBLIST_END),
 			     f, (e - 1 - p), c);
 	    cmdpop();
-	} else
+	} else {
+	    if (tok == AMPER || tok == AMPERBANG) {
+		c = 1;
+		*cmplx |= c;
+	    }		
 	    set_sublist_code(p, WC_SUBLIST_END, f, (e - 1 - p), c);
+	}
 	return 1;
     } else {
 	ecused--;