From 34e642923538a05ac21d7e7495da23fb0da56c5f Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Wed, 26 Jan 2022 16:39:33 +0100 Subject: passt, tap: Daemonise once socket is ready without waiting for connection The existing behaviour is not really practical: an automated agent in charge of starting both qemu and passt would need to fork itself to start passt, because passt won't fork to background until qemu connects, and the agent needs to unblock to start qemu. Instead of waiting for a connection to daemonise, do it right away as soon as a socket is available: that can be considered an initialised state already. Signed-off-by: Stefano Brivio --- tap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tap.h') diff --git a/tap.h b/tap.h index c437f5f..8942fcf 100644 --- a/tap.h +++ b/tap.h @@ -6,5 +6,5 @@ void tap_ip_send(struct ctx *c, struct in6_addr *src, uint8_t proto, char *in, size_t len, uint32_t flow); int tap_send(struct ctx *c, void *data, size_t len, int vnet_pre); -void tap_handler(struct ctx *c, uint32_t events, struct timespec *now); +void tap_handler(struct ctx *c, int fd, uint32_t events, struct timespec *now); void tap_sock_init(struct ctx *c); -- cgit v1.2.3