<feed xmlns='http://www.w3.org/2005/Atom'>
<title>monzero-core.git/src/daemonizer/posix_fork.cpp, branch v0.18.1.2</title>
<subtitle>Monzero core node, command-line wallet, consensus code, and release tooling.
</subtitle>
<id>https://code.monzero.org/monzero-core.git/atom?h=v0.18.1.2</id>
<link rel='self' href='https://code.monzero.org/monzero-core.git/atom?h=v0.18.1.2'/>
<link rel='alternate' type='text/html' href='https://code.monzero.org/monzero-core.git/'/>
<updated>2019-11-17T14:04:22Z</updated>
<entry>
<title>Fix #6147 DB corruption from child process overwrite</title>
<updated>2019-11-17T14:04:22Z</updated>
<author>
<name>Howard Chu</name>
<email>hyc@symas.com</email>
</author>
<published>2019-11-17T11:41:09Z</published>
<link rel='alternate' type='text/html' href='https://code.monzero.org/monzero-core.git/commit/?id=47d094c0c40605572f2fe3a9d62cb5c96ef37de8'/>
<id>urn:sha1:47d094c0c40605572f2fe3a9d62cb5c96ef37de8</id>
<content type='text'>
Don't leave stdout/stderr dangling on a fork.
</content>
</entry>
<entry>
<title>Removed a lot of unnecessary includes</title>
<updated>2018-11-15T16:29:34Z</updated>
<author>
<name>Martijn Otto</name>
<email>git@martijnotto.nl</email>
</author>
<published>2018-11-15T16:29:34Z</published>
<link rel='alternate' type='text/html' href='https://code.monzero.org/monzero-core.git/commit/?id=bd98e99c8095cf05c4d3282c888a87745ad1c559'/>
<id>urn:sha1:bd98e99c8095cf05c4d3282c888a87745ad1c559</id>
<content type='text'>
</content>
</entry>
<entry>
<title>monerod: do not log to tmpdir in daemon mode</title>
<updated>2018-02-23T20:27:14Z</updated>
<author>
<name>ston1th</name>
<email>ston1th@giftfish.de</email>
</author>
<published>2018-02-13T18:54:49Z</published>
<link rel='alternate' type='text/html' href='https://code.monzero.org/monzero-core.git/commit/?id=496055d12871eca27b024fd2f746a8e5d07e5714'/>
<id>urn:sha1:496055d12871eca27b024fd2f746a8e5d07e5714</id>
<content type='text'>
The logging to /tmp/bitmonero.daemon.stdout.stderr caused segfaults
if the /tmp mount was full (#2851).
Now the daemon is only logging to /tmp/bitmonero.daemon.stdout.stderr
in the debug builds.
</content>
</entry>
<entry>
<title>daemon: Add ability to write a PID file</title>
<updated>2017-07-21T22:34:56Z</updated>
<author>
<name>Erik de Castro Lopo</name>
<email>erikd@mega-nerd.com</email>
</author>
<published>2017-07-19T11:45:00Z</published>
<link rel='alternate' type='text/html' href='https://code.monzero.org/monzero-core.git/commit/?id=51efb21713ee630ca9c2f6aaaea98f18bce72106'/>
<id>urn:sha1:51efb21713ee630ca9c2f6aaaea98f18bce72106</id>
<content type='text'>
The PID file will only be written if the daemon is called with the
`--detach` command line argument and a `--pidfile /some/file/path`
argument.
</content>
</entry>
<entry>
<title>Don't hardcode /tmp</title>
<updated>2017-07-11T11:38:51Z</updated>
<author>
<name>Howard Chu</name>
<email>hyc@symas.com</email>
</author>
<published>2017-07-11T11:38:51Z</published>
<link rel='alternate' type='text/html' href='https://code.monzero.org/monzero-core.git/commit/?id=33d17c37e80acc8d810d870eee5f5aac202f7804'/>
<id>urn:sha1:33d17c37e80acc8d810d870eee5f5aac202f7804</id>
<content type='text'>
</content>
</entry>
<entry>
<title>daemonizer: posix: keep parent's working dir and umask</title>
<updated>2016-07-10T00:16:44Z</updated>
<author>
<name>redfish</name>
<email>redfish@galactica.pw</email>
</author>
<published>2016-07-10T00:09:56Z</published>
<link rel='alternate' type='text/html' href='https://code.monzero.org/monzero-core.git/commit/?id=ce6b83128e343687d526479f1a308d838a38f02a'/>
<id>urn:sha1:ce6b83128e343687d526479f1a308d838a38f02a</id>
<content type='text'>
Keep the working directory (and umask) inherited from
the parent. Otherwise, it's impossible to control
the working directory of the daemon (from systemd, for
example).

Furthermoer, bitmonerod attempts to create logging directories and files
*in current working directory*. This fails due to permission denied and
generates a (caught, nonfatal) exception. Below is the strace with this
patch applied (so, no `chdir("/")`), showing successful opens at `log/`
relative path. Without this patch they fail (sorry, didn't save the
trace).

```
28911 getcwd("/.../bitmonero", 128) = 25
28911 stat64("/var/lib/bitmonero/.bitmonero", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
28911 stat64("/etc/bitmonerod.conf", {st_mode=S_IFREG|0644, st_size=244, ...}) = 0
28911 open("/etc/bitmonerod.conf", O_RDONLY|O_LARGEFILE) = 3
28911 open("/var/log/bitmonero/bitmonero.log", O_WRONLY|O_CREAT|O_APPEND|O_LARGEFILE, 0666) = 3
28911 stat64("log", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
28911 stat64("log/dbg", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
28911 open("log/dbg/main.log", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 4
```
The reasoning of chdir("/") in order to prevent the daemon from holding
a filesystem in busy state is not compelling at all: the choice of
working directory for the daemon is the user's business not the
daemon's.
</content>
</entry>
<entry>
<title>Revert "Print stack trace upon exceptions"</title>
<updated>2016-03-21T10:12:23Z</updated>
<author>
<name>moneromooo-monero</name>
<email>moneromooo-monero@users.noreply.github.com</email>
</author>
<published>2016-03-21T10:12:12Z</published>
<link rel='alternate' type='text/html' href='https://code.monzero.org/monzero-core.git/commit/?id=f7301c3563e7ae19b8d7c65d8bc88f3c42eefc09'/>
<id>urn:sha1:f7301c3563e7ae19b8d7c65d8bc88f3c42eefc09</id>
<content type='text'>
Ain't nobody got time for link/cmake skullduggery.

This reverts commit fff238ec94ac6d45fc18c315d7bc590ddfaad63d.
</content>
</entry>
<entry>
<title>Print stack trace upon exceptions</title>
<updated>2016-03-19T21:48:36Z</updated>
<author>
<name>moneromooo-monero</name>
<email>moneromooo-monero@users.noreply.github.com</email>
</author>
<published>2016-03-19T21:48:36Z</published>
<link rel='alternate' type='text/html' href='https://code.monzero.org/monzero-core.git/commit/?id=fff238ec94ac6d45fc18c315d7bc590ddfaad63d'/>
<id>urn:sha1:fff238ec94ac6d45fc18c315d7bc590ddfaad63d</id>
<content type='text'>
Useful for debugging users' logs
</content>
</entry>
<entry>
<title>Daemonize changes pulled in -- daemon builds</title>
<updated>2015-02-24T05:05:19Z</updated>
<author>
<name>Thomas Winget</name>
<email>tewinget@gmail.com</email>
</author>
<published>2015-01-29T22:10:53Z</published>
<link rel='alternate' type='text/html' href='https://code.monzero.org/monzero-core.git/commit/?id=9193d6fb5be92df732af18b08b1e052f84cc2f9d'/>
<id>urn:sha1:9193d6fb5be92df732af18b08b1e052f84cc2f9d</id>
<content type='text'>
many RPC functions added by the daemonize changes
(and related changes on the upstream dev branch that were not merged)
were commented out (apart from return).  Other than that, this *should*
work...at any rate, it builds, and that's something.
</content>
</entry>
</feed>
