Opened 6 years ago
Last modified 4 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 , 6 years ago
| Component: | *unknown* → Interactive Environment |
|---|
comment:2 by , 6 years ago
follow-up: 6 comment:3 by , 6 years ago
| Priority: | high → normal |
|---|
Okay, I made a workaround for my tests. Should it still be fixed in the future?
comment:4 by , 6 years ago
| Milestone: | 1.14.0 → 1.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
follow-up: 8 comment:7 by , 5 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.
follow-up: 9 comment:8 by , 5 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 usesystemif 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.
comment:9 by , 5 years ago
Replying to casella:
I see no point spending time to implement workarounds. Better fix the
systemfunction so that it behaves the same way on both OSs.
I suppose playing around with bInheritHandles and UpdateProcThreadAttributeList could work.
comment:10 by , 5 years ago
| Milestone: | 1.17.0 → 1.18.0 |
|---|
Retargeted to 1.18.0 because of 1.17.0 timed release.

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