From 7af4c438c8ca80535f515e98c8eeb1fd9fea3663 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr>
Date: Tue, 11 Feb 2020 14:42:52 +0100
Subject: [PATCH] [Dome/system] fix stdio spec for spawned process

---
 Ivette/src/dome/src/misc/system.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Ivette/src/dome/src/misc/system.js b/Ivette/src/dome/src/misc/system.js
index ae4bed45862..51ffe3de75b 100644
--- a/Ivette/src/dome/src/misc/system.js
+++ b/Ivette/src/dome/src/misc/system.js
@@ -494,7 +494,7 @@ function stdSpec( spec , isOutput ) {
   case 'pipe':
     return { io: 'pipe' };
   default:
-    const fd = fs.openSync( spec.path , spec.mode || (isOutput ? 'w' : 'r') );
+    const fd = spec.path ? fs.openSync( spec.path , spec.mode || (isOutput ? 'w' : 'r') ) : undefined ;
     return (isOutput && spec.pipe) ? { io: 'pipe', fd } : { io: fd } ;
   }
 }
-- 
GitLab