LogPrint(eLogError,"Daemon: could not create pid file ",pidfile,": ",strerror(errno));
LogPrint(eLogError,"Daemon: could not create pid file ",pidfile,": ",strerror(errno));
returnfalse;
returnfalse;
}
}
#ifndef ANDROID
if(lockf(pidFH,F_TLOCK,0)!=0)
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));
LogPrint(eLogError,"Daemon: could not lock pid file ",pidfile,": ",strerror(errno));