(no commit message)
authorthk <thk@web>
Sat, 14 Mar 2020 17:55:43 +0000 (17:55 +0000)
committeradmin <admin@branchable.com>
Sat, 14 Mar 2020 17:55:43 +0000 (17:55 +0000)
doc/bugs/git-annex_remotedaemon_--foreground_exits_immediately_if_run_as_systemd_service.mdwn

index c3df3085a8a7d87dc0b3ae7dbfacb9961f69bcd8..1d6a90a224b0657465e9b30690e4abde5600b3cb 100644 (file)
@@ -226,3 +226,18 @@ I added some log statements and found out that in module **RemoteDaemon.Core** i
 exits with an exception saying
 
     <stdin>: 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'
+