assistant: Fix a crash on startup by avoiding using forkProcess

ghc 8.8.4 seems to have changed something that broke code that has been
successfully using forkProcess since 2012. Likely a change to GC internals.

Since forkProcess has never had clear documentation about how to
use it safely, avoid using it at all. Instead, when git-annex needs to
daemonize itself, re-run the git-annex command, in a new process group
and session.

This commit was sponsored by Luke Shumaker on Patreon.
This commit is contained in:
Joey Hess 2021-05-12 15:08:03 -04:00
parent ba7598dbab
commit 947d2a10bc
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
7 changed files with 84 additions and 41 deletions

View file

@ -39,3 +39,6 @@ local repository version: 8
### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)
> [[fixed|done]] in git-annex by avoiding using forkProcess.
> If the root cause is a ghc bug it's still unfixed there, but it won't
> affect git-annex. --[[Joey]]

View file

@ -0,0 +1,8 @@
[[!comment format=mdwn
username="joey"
subject="""comment 2"""
date="2021-05-12T17:53:04Z"
content="""
This might also affect git-annex remotedaemon, although it's running ok in
my tests. However, that could only be due to luck.
"""]]