git-annex/Annex
Joey Hess 7245a9ed53
Improve shutdown process for external special remotes and external backends
Make sure to relay any remaining stderr from the process after it has
shut down, rather than closing stderr just before shutdown. This avoids
a situation where the process is still running and tries to write to
stderr, getting a SIGPIPE. And, it ensures that no stderr output is
lost.

This may fix a problem encountered by datalad on windows, where it hangs
during the external special remote shutdown.

Before commit a49d300545, it closed stdin
and stdout, but left stderr open, and never killed the stderr waiter
thread, which presumably exited on its own. For async exception
safety, do need to at make sure that thread gets waited on, as that
commit does, but it introduced this problem.

Note that, the process's stdout is closed before waiting on it. It's too
late for anything it writes to stdout to be processed, and since we're
not going to consume any such writes, this avoids the process getting
blocked writing to stdout due to us not reading what it's buffered. This
does mean that if the process writes to stdout too late, it will get a
SIGPIPE. (This was already the case before the above-mentioned commit.)
In practice, I think only the protocol's ERROR is allowed to be
sent at a point where this could happen.
2020-11-02 12:56:35 -04:00
..
AdjustedBranch ByteString Ref continued 2020-04-07 13:27:11 -04:00
Branch fix warning 2020-02-17 15:06:28 -04:00
Concurrent differentiate between concurrency enabled at command line and by git config 2020-09-16 11:47:12 -04:00
Content convert replaceFile to createDirectoryUnder 2020-03-06 11:31:01 -04:00
LockPool Display a message when git-annex has to wait for a pid lock file held by another process 2020-08-26 13:05:34 -04:00
MetaData update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
SpecialRemote remove redundant imports 2020-06-22 11:05:34 -04:00
View update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Action.hs remove reapZombies 2020-09-25 11:50:38 -04:00
AdjustedBranch.hs sync, assistant: When merge.directoryRenames is not set, default it it to "false" 2020-09-07 13:50:58 -04:00
AutoMerge.hs resolvemerge: Improve cleanup of cruft left in the working tree by a conflicted merge 2020-09-07 16:50:27 -04:00
BloomFilter.hs Revert "data type that starts off using a set but converts to a bloom filter when large" 2020-07-01 20:12:19 -04:00
Branch.hs explicitly wait for a git process 2020-09-25 11:03:12 -04:00
BranchState.hs cache one more log file for metadata 2020-07-07 14:18:55 -04:00
CatFile.hs cat-file resource pool 2020-04-20 15:19:31 -04:00
ChangedRefs.hs ByteString Ref continued 2020-04-07 13:27:11 -04:00
CheckAttr.hs check-ignore resource pool 2020-04-21 11:25:28 -04:00
CheckIgnore.hs fix inverted logic in recent commit 2020-09-29 12:11:50 -04:00
Common.hs finally really add back custom-setup stanza 2017-12-31 16:36:39 -04:00
Concurrent.hs differentiate between concurrency enabled at command line and by git config 2020-09-16 11:47:12 -04:00
Content.hs when downloading same content from multiple urls, only display error if all fail 2020-09-02 11:35:07 -04:00
CurrentBranch.hs refactor getCurrentBranch 2018-10-19 17:29:18 -04:00
Difference.hs include git-annex-shell back in 2019-12-02 11:51:52 -04:00
DirHashes.hs Added http special remote, which is useful for accessing other remotes that publish content stored in them via http/https. 2020-09-01 15:16:35 -04:00
Drop.hs add SeekInput (not yet used) 2020-09-15 15:41:13 -04:00
Environment.hs include git-annex-shell back in 2019-12-02 11:51:52 -04:00
Export.hs Ref ByteString conversion done 2020-04-07 17:41:09 -04:00
ExternalAddonProcess.hs Improve shutdown process for external special remotes and external backends 2020-11-02 12:56:35 -04:00
FileMatcher.hs add, import: Fix a reversion in 7.20191009 that broke handling of --largerthan and --smallerthan 2020-10-19 15:36:18 -04:00
Fixup.hs Avoid converting .git file in a worktree or submodule to a symlink when the repository is not a git-annex repository. 2020-03-09 14:54:14 -04:00
GitOverlay.hs remove unused imports 2020-08-28 11:16:51 -04:00
HashObject.hs fix a case where file tracked by git unexpectedly becomes annex pointer file 2019-12-27 15:08:03 -04:00
Hook.hs don't try to remove pre-commit-annex and post-update-annex-hooks 2020-10-19 13:13:49 -04:00
Import.hs avoid git check-ignore overhead on importing known files 2020-09-30 11:20:44 -04:00
Ingest.hs split ProvidedInfo and UserProvidedInfo 2020-09-28 12:12:38 -04:00
Init.hs don't try to remove pre-commit-annex and post-update-annex-hooks 2020-10-19 13:13:49 -04:00
InodeSentinal.hs use filepath-bytestring for annex object manipulations 2019-12-11 15:25:07 -04:00
Journal.hs fix fileJournal 2019-12-18 11:29:34 -04:00
Link.hs refactor out Annex.PidLock 2020-08-26 12:29:13 -04:00
Locations.hs move: Improve resuming a move that was interrupted after the object was transferred 2020-10-21 10:31:56 -04:00
LockFile.hs fix a annex.pidlock issue 2020-06-17 15:30:59 -04:00
LockPool.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Magic.hs Serialize use of C magic library, which is not thread safe. 2020-09-17 17:27:42 -04:00
MetaData.hs wip RawFilePath 2x git-annex find speedup 2019-11-26 16:01:58 -04:00
Multicast.hs use programPath consistently, not readProgramFile 2020-03-30 16:06:27 -04:00
Notification.hs wip RawFilePath 2x git-annex find speedup 2019-11-26 16:01:58 -04:00
NumCopies.hs improve "unable to lock down 1 copy" message 2020-06-26 13:00:40 -04:00
Path.hs refactor out Annex.PidLock 2020-08-26 12:29:13 -04:00
Perms.hs fix some file modes in calls to withTmpFileIn to honor umask 2020-09-02 14:36:08 -04:00
PidLock.hs Fix a build failure on Windows. 2020-10-07 12:04:54 -04:00
Queue.hs remove one more warningIO 2019-11-12 10:45:52 -04:00
RemoteTrackingBranch.hs refactor 2019-11-11 19:10:52 -04:00
ReplaceFile.hs refactor 2020-03-06 11:43:07 -04:00
SpecialRemote.hs cache remote.log 2020-09-22 13:52:26 -04:00
Ssh.hs differentiate between concurrency enabled at command line and by git config 2020-09-16 11:47:12 -04:00
TaggedPush.hs Ref ByteString conversion done 2020-04-07 17:41:09 -04:00
Tmp.hs init: Fix a reversion that broke initialization on systems that need to use pid locking 2019-09-10 13:37:07 -04:00
Transfer.hs Parse youtube-dl progress output 2020-09-29 17:53:48 -04:00
UntrustedFilePath.hs importfeed: Fix reversion that caused some '.' in filenames to be replaced with '_' 2020-08-05 11:35:00 -04:00
UpdateInstead.hs v7 for all repositories 2019-08-30 14:09:14 -04:00
Url.hs Build with the http-client-restricted library when available 2020-06-22 11:31:31 -04:00
UUID.hs Fix a potential failure to parse git config 2020-04-13 13:05:41 -04:00
VariantFile.hs more RawFilePath 2019-12-18 17:10:28 -04:00
VectorClock.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Version.hs jump right to v8, don't stop part way 2020-02-24 13:21:00 -04:00
View.hs view: Avoid using ':' from metadata when generating a view 2020-10-26 15:38:08 -04:00
Wanted.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
WorkerPool.hs move remoteList into dupState 2020-04-17 14:36:45 -04:00
WorkTree.hs renaming 2020-07-10 14:17:35 -04:00
YoutubeDl.hs Parse youtube-dl progress output 2020-09-29 17:53:48 -04:00