[Pcsclite-cvs-commit] r2504 - in trunk/PCSC: . src
Ludovic Rousseau
rousseau at alioth.debian.org
Wed Apr 4 09:10:50 UTC 2007
Author: rousseau
Date: 2007-04-04 09:10:50 +0000 (Wed, 04 Apr 2007)
New Revision: 2504
Modified:
trunk/PCSC/configure.in
trunk/PCSC/src/pcscdaemon.c
Log:
use of --enable-runpid=FILE is now mandatory
Modified: trunk/PCSC/configure.in
===================================================================
--- trunk/PCSC/configure.in 2007-04-04 09:03:01 UTC (rev 2503)
+++ trunk/PCSC/configure.in 2007-04-04 09:10:50 UTC (rev 2504)
@@ -255,7 +255,7 @@
# --enable-runpid=FILE
AC_ARG_ENABLE(runpid,
AC_HELP_STRING([--enable-runpid=FILE],[file containing pcscd pid]),
-[runpid="${enableval}"], [runpid=false])
+[runpid="${enableval}"], [AC_ERROR([use of --enable-runpid=FILE is mandatory])])
AC_MSG_RESULT([enable runpid : $runpid])
Modified: trunk/PCSC/src/pcscdaemon.c
===================================================================
--- trunk/PCSC/src/pcscdaemon.c 2007-04-04 09:03:01 UTC (rev 2503)
+++ trunk/PCSC/src/pcscdaemon.c 2007-04-04 09:10:50 UTC (rev 2504)
@@ -71,7 +71,6 @@
int SendHotplugSignal(void)
{
-#ifdef USE_RUN_PID
pid_t pid;
pid = GetDaemonPid();
@@ -86,7 +85,6 @@
return EXIT_FAILURE ;
}
}
-#endif
return EXIT_SUCCESS;
} /* SendHotplugSignal */
@@ -350,7 +348,6 @@
if (rv == 0)
{
-#ifdef USE_RUN_PID
pid_t pid;
/* read the pid file to get the old pid and test if the old pcscd is
@@ -376,16 +373,10 @@
clean_temp_files();
}
else
-#endif
{
if (HotPlug)
{
-#ifdef USE_RUN_PID
Log1(PCSC_LOG_CRITICAL, "file " USE_RUN_PID " do not exist");
-#else
- Log1(PCSC_LOG_CRITICAL,
- "pcscd was not configured with --enable-runpid=FILE");
-#endif
Log1(PCSC_LOG_CRITICAL, "Hotplug failed");
return EXIT_FAILURE;
}
@@ -394,10 +385,8 @@
"file " PCSCLITE_PUBSHM_FILE " already exists.");
Log1(PCSC_LOG_CRITICAL,
"Maybe another pcscd is running?");
-#ifdef USE_RUN_PID
Log1(PCSC_LOG_CRITICAL,
"I can't read process pid from " USE_RUN_PID);
-#endif
Log1(PCSC_LOG_CRITICAL,
"Remove " PCSCLITE_PUBSHM_FILE " and " PCSCLITE_CSOCK_NAME);
Log1(PCSC_LOG_CRITICAL,
@@ -430,7 +419,6 @@
signal(SIGINT, signal_trap);
signal(SIGHUP, signal_trap);
-#ifdef USE_RUN_PID
/*
* Record our pid to make it easier
* to kill the correct pcscd
@@ -444,7 +432,6 @@
fclose(f);
}
}
-#endif
/*
* If PCSCLITE_IPC_DIR does not exist then create it
@@ -555,12 +542,10 @@
Log2(PCSC_LOG_ERROR, "Cannot unlink " PCSCLITE_CSOCK_NAME ": %s",
strerror(errno));
-#ifdef USE_RUN_PID
rv = SYS_Unlink(USE_RUN_PID);
if (rv != 0)
Log2(PCSC_LOG_ERROR, "Cannot unlink " USE_RUN_PID ": %s",
strerror(errno));
-#endif
}
void signal_reload(int sig)
More information about the Pcsclite-cvs-commit
mailing list