]>
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"
11 int main(int argc
, char *argv
[]) {
12 _cleanup_strv_free_
char **l
= NULL
;
14 usec_t duration
= USEC_PER_SEC
/ 10;
19 assert_se(safe_atou(argv
[1], &x
) >= 0);
20 duration
= x
* USEC_PER_SEC
;
23 n
= sd_listen_fds_with_names(false, &l
);
25 log_error_errno(n
, "Failed to get listening fds: %m");
29 for (i
= 0; i
< n
; i
++)
30 log_info("fd=%i name=%s\n", SD_LISTEN_FDS_START
+ i
, l
[i
]);
33 "STATUS=Starting up");