Hello, I try to package our EPG solution into a SNAP package. I managed to automatically start the necessary services, but I run into a problem. These services provide only a REST API to the outside world, the actual work is done in seperate worker processes. However, when running our solution within a snap, it seems not possible to start these seperate processes. I start them via fork and execvpe calls, is this prohibited for SNAP applications? Or should I use some kind of plugin or interface definition? The application which is called in execvpe is also part of the SNAP, I did try calling it with its ‘snap’ name, but this does not seem to work either Regards, Stephane
what are the exact errors you get, are there apparmor denials in your journal when your app tries to spawn the shipped binaries ?
Unfortunately not. The application just does not show up in PS output, it seems to exit immediately (according to waitpid output). Should it be possible to start an application? In that case I will continue investigating what exactly in my application causes this, and start removing code.
yes, if a binary is shipped in your snap you should be able to execute it from there, note though that only things like $SNAP/bin or $SNAP/usr/bin are in your PATH by default, if your app sits in some non-standard location in your snap you need to call it with full path or make sure the dir is added to the PATH variable in your environment.
Alright, that is something to check, thanks. I added it to my snapcraft.yml file in the apps section as well, I am now able to call it in my user environment via the snap name ( in my case clever.CyclerApp). Should I now be able to call it via execvpe under this name as well, without exact path?
Thank you for your support. It was a typical case of two problems in one: I had redirected the stderr output of the started application to /dev/null, so I did not see the actual error in journal. The actual error was a missing .so :-(. Strange as well, since I did add this .so to the snap, and another application did find it. Probably caused by me changing the process environment, including the PATH.