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