mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-06-15 18:46:52 +02:00
Few cents to get fullly console i2pd under Android
This commit is contained in:
parent
f11266972e
commit
6916147dda
4 changed files with 119 additions and 13 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue