[Pcsclite-cvs-commit] r4899 - /trunk/PCSC/src/pcscdaemon.c

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Thu Apr 29 07:14:06 UTC 2010


Author: rousseau
Date: Thu Apr 29 07:14:04 2010
New Revision: 4899

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=4899
Log:
main(): fork() only in case of auto exit to not detach from the terminal
if launched in stand alone forground mode ("pcscd -fda" for example)

Modified:
    trunk/PCSC/src/pcscdaemon.c

Modified: trunk/PCSC/src/pcscdaemon.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/pcscdaemon.c?rev=4899&op=diff
==============================================================================
--- trunk/PCSC/src/pcscdaemon.c (original)
+++ trunk/PCSC/src/pcscdaemon.c Thu Apr 29 07:14:04 2010
@@ -405,11 +405,12 @@
 			return EXIT_FAILURE;
 		}
 
-	/* fork() so that pcscd always return in --auto-exit mode
-	 * but do not close stdout yet since we may need to send logs */
-	if (SYS_Daemon(1, 1))
-		Log2(PCSC_LOG_CRITICAL, "SYS_Daemon() failed: %s",
-			strerror(errno));
+	if (AutoExit)
+		/* fork() so that pcscd always return in --auto-exit mode
+		 * but do not close stdout yet since we may need to send logs */
+		if (SYS_Daemon(1, 1))
+			Log2(PCSC_LOG_CRITICAL, "SYS_Daemon() failed: %s",
+					strerror(errno));
 
 	/*
 	 * If this is set to one the user has asked it not to fork




More information about the Pcsclite-cvs-commit mailing list