From f4768bffd3dbb2fe243966572ba74002024d96e1 Mon Sep 17 00:00:00 2001 From: Allan Bowe <4420615+allanbowe@users.noreply.github.com> Date: Wed, 12 Mar 2025 17:27:57 +0000 Subject: [PATCH] fix: extra bit of sleep for file recognition closes #381 --- api/src/controllers/internal/Session.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/api/src/controllers/internal/Session.ts b/api/src/controllers/internal/Session.ts index 751d306..2ba483b 100644 --- a/api/src/controllers/internal/Session.ts +++ b/api/src/controllers/internal/Session.ts @@ -260,9 +260,16 @@ data _null_; rc=filename(fname,getoption('SYSIN') ); if rc = 0 and fexist(fname) then rc=fdelete(fname); rc=filename(fname); - /* now wait for the real SYSIN */ - slept=0; - do until ( fileexist(getoption('SYSIN')) or slept>(60*15) ); + /* now wait for the real SYSIN (location of code.sas) */ + slept=0;fname=''; + do until (slept>(60*15) ); + rc=filename(fname,getoption('SYSIN') ); + if rc = 0 and fexist(fname) then do; + putlog fname=; + rc=filename(fname); + rc=sleep(0.01,1); /* wait just a little more */ + stop; + end; slept=slept+sleep(0.01,1); end; stop;