Hi,
i’m working on an qt/c++ application, where i need some system call’s. For testing i just wanted to write something to the journal like system("echo test123 | systemd-cat"). This works in devmode pretty fine but in classic mode i get a page fault.
As i understand, classic mode should be able to do system calls by default?
I tried with several plugs: plugs: [home, network, desktop, framebuffer, network-control, raw-usb, removable-media, snapd-control, client, system-observe, system-files, system-trace, process-control, log-observe, storage-framework-service].
Also snappy-debug couldn’t help with the problem.
Maybe someone has a solution or more ideas to try?
Edit: commands from snap shell are working also fine
systemd-cat comes from the host (I suspect), so if your in-snap bits have proper rpaths and program loaders set, this should just work. If you achieved library discovery through LD_LIBRARY_PATH you might potentially be mixing libraries from those of the snap and base with those of the host (this is not a problem in devmode as your snap pivots its root to that of the base).
If you are doing a mix of rpaths and LD_LIBARARY_PATH (or have a runpath setup in your binaries), then you get a mix of libraries (libc potentially) which will most certainly also be a cause for this.