On 20-03-2019 14:01, Reindl Harald wrote: > Am 20.03.19 um 20:53 schrieb Daniele Nicolodi: >> I am not sure what you are trying to say, but the first source code >> snippet in your email in not valid C code. I don't know what you mean >> by "beginners" in the subject of your email, but I think that the >> documentation assumes basic knowledge of the C programming language. > > tell that http://0pointer.de/blog/projects/socket-activation.html Communication would be more effective if you would write complete sentences instead than having us guess what you are trying to say. > /* Source Code Example #2: UPDATED, SOCKET-ACTIVATABLE SERVICE */ > ... > #include "sd-daemon.h" > ... > int fd; > > if (sd_listen_fds(0) != 1) { > fprintf(stderr, "No or too many file descriptors received.\n"); > exit(1); > } > > fd = SD_LISTEN_FDS_START + 0; This code snipped clearly has "..." as placeholders for code parts that were not included in the documentation snippets. Your test program did not include the "..." markers, thus I believe that you understood that much. For how to replace the placeholders with working C code you need to consult your favorite C programming manual. I don't think Lennart blog post was meant to be a C programming tutorial as well as an introduction to systemd socket activation. Cheers, Dan _______________________________________________ systemd-devel mailing list systemd-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/systemd-devel