Secured Open Source Embedded Software


The functions sd_listen_fds and sd_listen_fds_with_names check the values of $LISTEN_FDS/$LISTEN_PID and fail when they are not correctly set (man sd_listen_fds).

So replacing



ExecStart=/usr/bin/strace /myprog...

doesn't work because the value of $LISTEN_PID points the process strace.


So to trace myprog you have to write:

ExecStart=/bin/sh -c '/usr/bin/strace -p $$$$ & exec /myprog...'

The dollar sign has to appear 4 times because of systemd escaping/expansion rules (man systemd.service)

And dont forget the exec


Archived Publications

About us

Our redpesk® product: a software factory in a white box enabling you to speed up and control your embedded developments from the initial design cycle to your product end of life.

Contact information

Halles St Louis,
    rue Docteur Bodelio
56100 Lorient
02 57 62 02 47