Skip to content

Commit

Permalink
write status to err file (#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrpo authored Nov 2, 2024
1 parent 721a2da commit c1fa44f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions testmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,11 @@ def writeResult():
def writeResultAndExit(exitStatus):
writeResult()
print("Calling exit ...")
with open(errFile, 'a+') as fp:
fp.write("[Calling os._exit(%s)]\n" % exitStatus)
fp.flush()
sys.stdout.flush()
os._exit(exitStatus)
# calling sys.exit will hang in lock.acquire()
# sys.exit(exitStatus)

def sendExpressionTimeout(omc, cmd, timeout):
with open(errFile, 'a+') as fp:
Expand Down

0 comments on commit c1fa44f

Please sign in to comment.