FileHandler is dropped, when providing app is called from commandLine

Hi there,

I have an issue when starting an app directly.

Scenario

  • I have 2 apps.
  • App 1 opens a file and provides the filehandler to App2.
  • App2 processes the file.
  • App 1 shall be called via the commandline from its real location

/legato/systems/current/appsWriteable/myApp1/bin/myApp1

Issue
When calling App2 from App1, the filehandler is dropped with the message

“Ancillary data was discarded because it couldn’t fit in our buffer.”

This only happens, when I call the app from its original path. When I call

app start App1

the filehandler is properly forwarded.

Remarks

  • I want to provide the fileName by commandLine, that’s why I can’t call app start App1.(for the test, that’s deactivated)
  • I’m using Legato Framework 18.10.3 and for the moment, I can’t upgrade to the new legato.
  • I tried to rename the app at it’s original path which caused app start App1 to fail; so I’m definitely calling the right path.
  • I’m using “open(” and “close(” instead of the legato-equivalents. Don’t know if this is of any importance.

Would be happy about any ideas or suggestions how to fix this issue.

Thanks for reading and any answer

not quite recommend directly running the app on its real location, you should use “app start” to run the application.

you can have a look on this sample application about how to pass argument to application:

To run the application, you need to use “app runProc”
e.g.
app runProc modemDemo1 send --exe=send – 1234567 “Status”

Thank you, that fixed my issue :slight_smile: