mirror of
https://github.com/kingk85/uFTP.git
synced 2025-07-18 01:36:10 +03:00
-1st daemonize then single instance check call
This commit is contained in:
@ -91,24 +91,24 @@ void configurationRead(ftpParameters_DataType *ftpParameters)
|
|||||||
|
|
||||||
void applyConfiguration(ftpParameters_DataType *ftpParameters)
|
void applyConfiguration(ftpParameters_DataType *ftpParameters)
|
||||||
{
|
{
|
||||||
|
/* Fork the process daemon mode */
|
||||||
|
if (ftpParameters->daemonModeOn == 1)
|
||||||
|
{
|
||||||
|
daemonize("uFTP");
|
||||||
|
}
|
||||||
|
|
||||||
if (ftpParameters->singleInstanceModeOn == 1)
|
if (ftpParameters->singleInstanceModeOn == 1)
|
||||||
{
|
{
|
||||||
int returnCode = isProcessAlreadyRunning();
|
int returnCode = isProcessAlreadyRunning();
|
||||||
|
|
||||||
if (returnCode == 1)
|
if (returnCode == 1)
|
||||||
{
|
{
|
||||||
printf("\nThe process is already running..");
|
printf("\nThe process is already running..");
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Fork the process daemon mode */
|
|
||||||
if (ftpParameters->daemonModeOn == 1)
|
|
||||||
{
|
|
||||||
daemonize("uFTP");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void initFtpData(ftpDataType *ftpData)
|
void initFtpData(ftpDataType *ftpData)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
Reference in New Issue
Block a user