git-annex/Remote
Joey Hess a49d300545
async exception safety for external special remote processes
Since an external process can be in the middle of some operation when an
async exception is received, it has to be shut down then. Using
cleanupProcess will close its IO handles and send it a SIGTERM.

If a special remote choses to catch SIGTERM, it's fine for it to do some
cleanup then, but until it finishes, git-annex will be blocked waiting
for it. If a special remote blocked SIGTERM, it would cause a hang.
Mentioned in docs.

Also, in passing, fixed a FD leak, it was not closing the error handle
when shutting down the external. In practice that didn't matter before because
it was only run when git-annex was itself shutting down, but now that it
can run on exception, it would have been a problem.
2020-06-09 12:22:14 -04:00
..
Directory make storeKey throw exceptions 2020-05-13 14:03:00 -04:00
External async exception safety for external special remote processes 2020-06-09 12:22:14 -04:00
Helper audit all uses of SomeException to avoid catching async exceptions 2020-06-05 15:16:57 -04:00
List auto-init autoenable=yes 2020-05-27 12:40:35 -04:00
Rsync fix windows build 2020-01-01 14:27:03 -04:00
WebDAV more RawFilePath 2019-12-18 17:10:28 -04:00
Adb.hs convert renameExport to throw exception 2020-05-15 15:08:09 -04:00
BitTorrent.hs make removeKey throw exceptions 2020-05-14 14:11:05 -04:00
Bup.hs fix reversion 2020-06-05 19:06:09 -04:00
Ddar.hs convert to withCreateProcess for async exception safety 2020-06-04 15:45:52 -04:00
Directory.hs fix file descriptor leak 2020-06-05 15:34:43 -04:00
External.hs async exception safety for external special remote processes 2020-06-09 12:22:14 -04:00
GCrypt.hs make removeKey throw exceptions 2020-05-14 14:11:05 -04:00
Git.hs convert to withCreateProcess for async exception safety 2020-06-04 15:45:52 -04:00
GitLFS.hs make removeKey throw exceptions 2020-05-14 14:11:05 -04:00
Glacier.hs close stdin handles before waiting on commands 2020-06-05 17:27:49 -04:00
Hook.hs make removeKey throw exceptions 2020-05-14 14:11:05 -04:00
List.hs auto-init autoenable=yes 2020-05-27 12:40:35 -04:00
P2P.hs make retrieveKeyFile and retrieveKeyFileCheap throw exceptions 2020-05-13 17:07:07 -04:00
Rsync.hs convert to withCreateProcess for async exception safety 2020-06-04 15:45:52 -04:00
S3.hs fix embedcreds=yes reversion 2020-05-21 14:35:30 -04:00
Tahoe.hs make removeKey throw exceptions 2020-05-14 14:11:05 -04:00
Web.hs make removeKey throw exceptions 2020-05-14 14:11:05 -04:00
WebDAV.hs fix embedcreds=yes reversion 2020-05-21 14:35:30 -04:00