From 2f54b19d45750f6b4175a28eed1e1a74380dac2b Mon Sep 17 00:00:00 2001 From: thk Date: Sat, 14 Mar 2020 17:55:43 +0000 Subject: [PATCH] --- ...its_immediately_if_run_as_systemd_service.mdwn | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/doc/bugs/git-annex_remotedaemon_--foreground_exits_immediately_if_run_as_systemd_service.mdwn b/doc/bugs/git-annex_remotedaemon_--foreground_exits_immediately_if_run_as_systemd_service.mdwn index c3df3085a8..1d6a90a224 100644 --- a/doc/bugs/git-annex_remotedaemon_--foreground_exits_immediately_if_run_as_systemd_service.mdwn +++ b/doc/bugs/git-annex_remotedaemon_--foreground_exits_immediately_if_run_as_systemd_service.mdwn @@ -226,3 +226,18 @@ I added some log statements and found out that in module **RemoteDaemon.Core** i exits with an exception saying : hGetLine: end of file + +### 2020-03-14 Update with workaround + +So **man systemd.exec** says in section **StandardInput=**: + +> If null is selected, standard input will be connected to /dev/null, i.e. all read attempts by the process will result in immediate EOF. + +and + +> This setting defaults to null. + +My current workaround is this ExecStart line in my systemd service definition: + + ExecStart=/bin/sh -c 'sleep infinity | git-annex remotedaemon --verbose --debug --foreground' + -- 2.30.2