Opened 6 years ago

Last modified 3 years ago

#5451 new defect

OpenModelica.Scripting.system behaving different on Windows and Linux

Reported by: Andreas Heuermann Owned by: somebody
Priority: normal Milestone:
Component: Interactive Environment Version: v1.14.0-dev-nightly
Keywords: Scripting mos Cc:

Description

The Modelica scripting function system surpresses output on Windows but not on Linux.

E.g calling the following mos-Script

system("echo \"Text output only on Linux visible\"");

only outputs the text on Linux.

I need it for testing OMSI FMUs with OMSimulator and check the error and warnings from OMSimulator. The test output should be equal on both OS.

Change History (11)

comment:1 by Francesco Casella, 6 years ago

Component: *unknown*Interactive Environment

comment:2 by Martin Sjölund, 6 years ago

I believe this is why we pipe the output to files in mos-scripts and then use readFile to print the log-file.

comment:3 by Andreas Heuermann, 6 years ago

Priority: highnormal

Okay, I made a workaround for my tests. Should it still be fixed in the future?

comment:4 by Francesco Casella, 5 years ago

Milestone: 1.14.01.16.0

Releasing 1.14.0 which is stable and has many improvements w.r.t. 1.13.2. This issue is rescheduled to 1.16.0

comment:5 by Francesco Casella, 4 years ago

Milestone: 1.16.01.17.0

Retargeted to 1.17.0 after 1.16.0 release

in reply to:  3 comment:6 by Lennart Ochel, 4 years ago

@sjoelund.se, should it be fixed?

comment:7 by Andreas Heuermann, 4 years ago

Well there is an easy workaround for it.
But if we want all tests to pass on Windows without rewriting all that use system if would (maybe) be faster.

in reply to:  7 ; comment:8 by Francesco Casella, 4 years ago

Replying to AnHeuermann:

Well there is an easy workaround for it.
But if we want all tests to pass on Windows without rewriting all that use system if would (maybe) be faster.

I see no point spending time to implement workarounds. Better fix the system function so that it behaves the same way on both OSs.

in reply to:  8 comment:9 by Martin Sjölund, 4 years ago

Replying to casella:

I see no point spending time to implement workarounds. Better fix the system function so that it behaves the same way on both OSs.

I suppose playing around with bInheritHandles and UpdateProcThreadAttributeList could work.

comment:10 by Francesco Casella, 4 years ago

Milestone: 1.17.01.18.0

Retargeted to 1.18.0 because of 1.17.0 timed release.

comment:11 by Francesco Casella, 3 years ago

Milestone: 1.18.0

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.