aboutsummaryrefslogtreecommitdiff
path: root/Utility/Daemon.hs
Commit message (Collapse)AuthorAge
* terminateProcessId renamedGravatar Joey Hess2017-10-25
| | | | win32 upstream suggested a better name
* build for windows with forked win32 package that has terminateProcessIdGravatar Joey Hess2017-10-25
| | | | | | | | | Get ugly reversion out of CHANGELOG. Also, relocated the windows stack.yaml to top, and updated windows build instructions. This commit was sponsored by Henrik Riomar on Patreon.
* Avoid backtraces on expected failures when built with ghc 8; only use ↵Gravatar Joey Hess2016-11-15
| | | | | | | | | | | | | backtraces for unexpected errors. ghc 8 added backtraces on uncaught errors. This is great, but git-annex was using error in many places for a error message targeted at the user, in some known problem case. A backtrace only confuses such a message, so omit it. Notably, commands like git annex drop that failed due to eg, numcopies, used to use error, so had a backtrace. This commit was sponsored by Ethan Aubin.
* avoid crashing in checkDaemon when fcntl locking is not supportedGravatar Joey Hess2015-11-16
| | | | | Instead, just assume the daemon isn't running. Since the pid file locking fails on such a filesystem, we know it's not running.
* update my email address and homepage urlGravatar Joey Hess2015-01-21
|
* revert parentDir changeGravatar Joey Hess2015-01-09
| | | | | | | | Reverts 2bba5bc22d049272d3328bfa6c452d3e2e50e86c Unfortunately, this caused breakage on Windows, and possibly elsewhere, because parentDir and takeDirectory do not behave the same when there is a trailing directory separator.
* made parentDir return a Maybe FilePath; removed most uses of itGravatar Joey Hess2015-01-06
| | | | | | | | parentDir is less safe than takeDirectory, especially when working with relative FilePaths. It's really only useful in loops that want to terminate at / This commit was sponsored by Audric SCHILTKNECHT.
* fixed all remaining build warnings on WindowsGravatar Joey Hess2014-12-29
|
* fix some mixed space+tab indentationGravatar Joey Hess2014-10-09
| | | | | | | | | This fixes all instances of " \t" in the code base. Most common case seems to be after a "where" line; probably vim copied the two space layout of that line. Done as a background task while listening to episode 2 of the Type Theory podcast.
* fix imports for windowsGravatar Joey Hess2014-08-23
|
* Windows: Fix locking issue that prevented the webapp starting (since ↵Gravatar Joey Hess2014-07-14
| | | | | | | | 5.20140707). Reversion introduced in 89c188fac37c20c40b0a9dabeb35403cfa4e4f52. The locking code was wrong; the webapp re-ran itself, saw pid was locked, and so didn't start!
* Ignore setsid failures.Gravatar Joey Hess2014-06-09
|
* qualify commentGravatar Joey Hess2014-06-09
|
* fix windows buildGravatar Joey Hess2014-05-14
|
* setsid when running webapp in foreground tooGravatar Joey Hess2014-05-14
| | | | | | | | This avoids ssh prompting for passwords on stdin, ever. It may also change other behavior of other programs, as there is no controlling terminal now. However, setsid was already done when running the assistant in daemon mode, so any behavior changes should not be really new.
* relicense general utility library code to BSDGravatar Joey Hess2014-05-10
| | | | | Omitted a couple of files what have had significant contributions from others.
* hlintGravatar Joey Hess2014-04-26
|
* windows: Fix start for already running daemonGravatar Joey Hess2014-02-13
|
* windows: Fix daemon pid file locking.Gravatar Joey Hess2014-02-13
| | | | | Well, as much as it can be fixed on windows. Not atomic; not entirely guarded against the wrong process having the pid file locked.
* windows: Fix process termination code.Gravatar Joey Hess2014-02-13
| | | | | | | | | | | The ctrl-c hack used before didn't actually seem to work. No haskell libraries expose TerminateProcess. I tried just calling it via FFI, but got segfaults, probably to do with the wacky process handle not being managed correctly. Moving it all into one C function worked. This was hell. The EvilLinker hack was just final icing on the cake. We all know what the cake was made of.
* cleanup thanks to Utility.PIDGravatar Joey Hess2014-02-11
|
* fix windows build (and make --stop work on windows, incidentially)Gravatar Joey Hess2014-02-11
| | | | The Utility.PID will clean up other code soon.
* remove unimplemented windows stubsGravatar Joey Hess2014-02-11
|
* fix windows buildGravatar Joey Hess2014-01-29
|
* change a few renameFile's to renameGravatar Joey Hess2014-01-29
| | | | | AFAIK, none of these ever operate on directories, but nor do I want to explicitly check if they're files and fail if not.
* unmask async exceptions after forkGravatar Joey Hess2013-10-10
| | | | | | | | | Turns out that forkProcess masks async exceptions. Unmask them so that the daemon code can use them for thread IPC. There is some risk this introduces breakage in git-annex, but it would be breakage that would already occur when the assistant was run with --foreground.
* avoid more build warnings on WindowsGravatar Joey Hess2013-08-04
|
* get rid of __WINDOWS__, use mingw32_HOST_OSGravatar Joey Hess2013-08-02
| | | | | The latter is harder for me to remember, but avoids build failures in code used by the configure program.
* fix a minor fd leakGravatar Joey Hess2013-05-27
|
* fix the day's Windows permissions damageGravatar Joey Hess2013-05-14
|
* fill in a few windows stubsGravatar Joey Hess2013-05-14
|
* fix permission damage (thanks, Windows)Gravatar Joey Hess2013-05-11
|
* clean up from windows portingGravatar Joey Hess2013-05-11
|
* git-annex now builds on Windows (doesn't work)Gravatar Joey Hess2013-05-11
|
* fixup #if 0 stubs to use #ifndef mingw32_HOST_OSGravatar Joey Hess2013-05-10
| | | | | | That's needed in files used to build the configure program. For the other files, I'm keeping my __WINDOWS__ define, as I find that much easier to type. I may search and replace it to use the mingw32_HOST_OS thing later.
* stub out POSIX stuffGravatar Joey Hess2013-05-10
|
* assistant: Logs are rotated to avoid them using too much disk space.Gravatar Joey Hess2013-03-01
| | | | | | This cannot completely guard against a runaway log event, and only runs every hour anyway, but it should avoid most problems with very long-running, active assistants using up too much space.
* webapp: Now always logs to .git/annex/daemon.logGravatar Joey Hess2013-01-15
| | | | | | | | It used to not log to daemon.log when a repository was first created, and when starting the webapp. Now both do. Redirecting stdout and stderr to the log is tricky when starting the webapp, because the web browser may want to communicate with the user. (Either a console web browser, or web.browser = echo) This is handled by restoring the original fds when running the browser.
* finished where indentation changesGravatar Joey Hess2012-12-13
|
* fix "daemon is already running" message displayGravatar Joey Hess2012-11-29
| | | | | Display it before daemon forks, so it's not shown after the shell prompt returns.
* make pid file directoryGravatar Joey Hess2012-08-08
|
* write pid file even when running in foregroundGravatar Joey Hess2012-08-01
| | | | | | | | This prevents multiple runs of the assistant in the foreground, and lets --stop stop foregrounded runs too. The webapp firstrun case also now writes a pid file, once it's made the git repo to put it in.
* git annex webapp --force forces a restart of the daemonGravatar Joey Hess2012-07-26
| | | | Useful for testing..
* git annex webapp now opens a browser to the webappGravatar Joey Hess2012-07-25
| | | | Also, starts the assistant if it wasn't already running.
* better pid file locking codeGravatar Joey Hess2012-07-02
|
* fix pid file writingGravatar Joey Hess2012-06-15
| | | | need to truncate, or part of previous longer pid may be left after writing
* bugfixGravatar Joey Hess2012-06-11
|
* git annex watch --stopGravatar Joey Hess2012-06-11
|
* fix pid file lockingGravatar Joey Hess2012-06-11
| | | | | Ok, that's odd.. opening it before fork breaks the locking. I don't understand why.
* add a pid fileGravatar Joey Hess2012-06-11
| | | | | Writes pid to a file. Is supposed to take an exclusive lock, but that's not working, and it's too late for me to understand why.