aboutsummaryrefslogtreecommitdiff
path: root/daemonize.go
AgeCommit message (Collapse)Author
2017-07-24main: redirectStdFds: keep logger from holding stdout openJakob Unterwurzacher
We passed our stdout and stderr to the new logger instance, which makes sense to see any error message, but also means that the fd is kept open even when we close it. Fixes the new TestMountBackground test and https://github.com/rfjakob/gocryptfs/issues/130 .
2017-07-23main: move redirectStdFds() to daemonize.goJakob Unterwurzacher
This really is a part of daemonization. No code changes.
2017-05-07exitcodes: pull all exit code definitions into the packageJakob Unterwurzacher
This commit defines all exit codes in one place in the exitcodes package. Also, it adds a test to verify the exit code on incorrect password, which is what SiriKali cares about the most. Fixes https://github.com/rfjakob/gocryptfs/issues/77 .
2016-11-26main: fix USR1 race condition, fixes test flakinessJakob Unterwurzacher
We could have gotten the signal before the handler was ready, which caused the process to wait indefinitely. This was the reason test.bash sometimes hung.
2016-11-01main: fix comments that reference "-f"Jakob Unterwurzacher
2016-11-01main: rename "-f" to "-fg"Jakob Unterwurzacher
"-f" looks too much like "--force". The old variant is still accepted for compatability.
2016-09-25main: add explicit exit after forkChildJakob Unterwurzacher
Trying to make it more obvious what is happening.
2016-06-15Rename internal "toggledlog" package to "tlog"Jakob Unterwurzacher
tlog is used heavily everywhere and deserves a shorter name. Renamed using sed magic, without any manual rework: find * -type f -exec sed -i 's/toggledlog/tlog/g' {} +
2016-06-05toggledlog: convert remaing naked fmt.Print*Jakob Unterwurzacher
Several fatal errors were just printed to stdout, which meant they were invisible when running the test suite. Fix this by introducing toggledlog.Fatal and convert as follows: Fatal errors -> toggledlog.Fatal Warnings -> toggledlog.Warn Password prompts -> fmt.Fprintf
2016-01-21Wrap Logger to make disabling output more efficientJakob Unterwurzacher
Instead of using SetOutput(ioutil.Discard), which means that Printf is still called for every debug message, use a simple and fast boolean check. Streaming write performance improves from 86 to 93 MB/s.
2016-01-20Switch to syslog when running in the backgroundJakob Unterwurzacher
2015-11-14Refactor cli argument handlingJakob Unterwurzacher
Also, add the "-config" option for storing gocryptfs.conf outside of CIPHERDIR.
2015-11-09Use new arg "-notifypid" for more robust daemonizationJakob Unterwurzacher
No more string matching on the parent command line!
2015-11-01Fix missing printf arguments discovered by "go vet"Jakob Unterwurzacher
2015-10-11Run gofmtv0.2Jakob Unterwurzacher
2015-10-11Add native daemonizationJakob Unterwurzacher