]>
git.ipfire.org Git - thirdparty/systemd.git/blob - src/test/test-daemon.c
1 /* SPDX-License-Identifier: LGPL-2.1+ */
3 This file is part of systemd.
5 Copyright 2010 Lennart Poettering
10 #include "sd-daemon.h"
12 #include "parse-util.h"
15 int main(int argc
, char*argv
[]) {
16 _cleanup_strv_free_
char **l
= NULL
;
18 usec_t duration
= USEC_PER_SEC
/ 10;
23 assert_se(safe_atou(argv
[1], &x
) >= 0);
24 duration
= x
* USEC_PER_SEC
;
27 n
= sd_listen_fds_with_names(false, &l
);
29 log_error_errno(n
, "Failed to get listening fds: %m");
33 for (i
= 0; i
< n
; i
++)
34 log_info("fd=%i name=%s\n", SD_LISTEN_FDS_START
+ i
, l
[i
]);
37 "STATUS=Starting up");