]>
git.ipfire.org Git - thirdparty/systemd.git/blob - src/test/test-daemon.c
1 /* SPDX-License-Identifier: LGPL-2.1+ */
7 #include "parse-util.h"
10 int main(int argc
, char*argv
[]) {
11 _cleanup_strv_free_
char **l
= NULL
;
13 usec_t duration
= USEC_PER_SEC
/ 10;
18 assert_se(safe_atou(argv
[1], &x
) >= 0);
19 duration
= x
* USEC_PER_SEC
;
22 n
= sd_listen_fds_with_names(false, &l
);
24 log_error_errno(n
, "Failed to get listening fds: %m");
28 for (i
= 0; i
< n
; i
++)
29 log_info("fd=%i name=%s\n", SD_LISTEN_FDS_START
+ i
, l
[i
]);
32 "STATUS=Starting up");