Results 98 comments of Frank

no, the function I edited takes the providedListeners, which could only be inherited. they have nothing to do with the sockets gitea created. https://github.com/go-gitea/gitea/blob/c18d8d6968cb175703942631f0094ffb415f51f4/modules/graceful/net_unix.go#L56-L68 The logic you referenced happens outside...

> 3\. If we look at how restart and this FD passing actually works you see that it's driven through the common environment variable `LISTEN_FDS` which we use in graceful-restart...

> Why is it a bad idea? I guess it's not important. systemd defines LISTEN_FDS solely for passing sockets to services. it's set by systemd, and should only be set...

> How else do you communicate across restarts? It's completely consistent with the use of `LISTEN_FDS`. How else do you propose that we communicate this information? gitea needn't care about...

scenarios: ## gitea without LFDS gitea creates socket file, and deletes it after shutdown. `unixListener.SetUnlinkOnClose(true)` never gets executed because `providedListeners` is empty. ## gitea with LFDS `unixListener.SetUnlinkOnClose(true)` gets executed, function...

........yes this doesn't fix it i know i need coffee

well sorry for being aggressive. I thought the code was intended for systemd support in the first place. I'll try making both systemd and graceful restart work.

will gitea unlink the socket file after a second graceful restart?

it seems to me that the patched gitea fails to delete the socket after `pkill -1 gitea` and then `pkill gitea`

~~could we just... rename `LISTEN_FDS` to something like `GITEA_LISTEN_FDS` to avoid conflict?~~ I'm not feeling right about `UNLINK_FDS`, I think there's a better way