mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
.apk builds. untested
This commit is contained in:
parent
28c2ca8bf8
commit
58b058ab3a
15 changed files with 314 additions and 10 deletions
|
@ -74,9 +74,11 @@ namespace i2p
|
|||
}
|
||||
|
||||
// point std{in,out,err} descriptors to /dev/null
|
||||
stdin = freopen("/dev/null", "r", stdin);
|
||||
#ifndef ANDROID
|
||||
stdin = freopen("/dev/null", "r", stdin);
|
||||
stdout = freopen("/dev/null", "w", stdout);
|
||||
stderr = freopen("/dev/null", "w", stderr);
|
||||
#endif
|
||||
}
|
||||
|
||||
// Pidfile
|
||||
|
@ -92,7 +94,12 @@ namespace i2p
|
|||
LogPrint(eLogError, "Daemon: could not create pid file ", pidfile, ": ", strerror(errno));
|
||||
return false;
|
||||
}
|
||||
#ifndef ANDROID
|
||||
if (lockf(pidFH, F_TLOCK, 0) != 0)
|
||||
#else
|
||||
//TODO ANDROID actually need to read man for this, blindly took a solution from <https://forum.qt.io/topic/27872/qtjsondb-build-failed-for-android/2>. -anon5
|
||||
if (fcntl(pidFH, 1, 0) < 0)
|
||||
#endif
|
||||
{
|
||||
LogPrint(eLogError, "Daemon: could not lock pid file ", pidfile, ": ", strerror(errno));
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue