Few cents to get fullly console i2pd under Android

This commit is contained in:
unlnown542a 2018-04-21 21:48:42 +03:00
parent f11266972e
commit 6916147dda
4 changed files with 119 additions and 13 deletions

View file

@ -138,11 +138,14 @@ namespace i2p
LogPrint(eLogError, "Daemon: could not create pid file ", pidfile, ": ", strerror(errno));
return false;
}
#ifndef ANDROID
if (lockf(pidFH, F_TLOCK, 0) != 0)
{
LogPrint(eLogError, "Daemon: could not lock pid file ", pidfile, ": ", strerror(errno));
return false;
}
#endif
char pid[10];
sprintf(pid, "%d\n", getpid());
ftruncate(pidFH, 0);