View Issue Details

IDProjectCategoryView StatusLast Update
0018197FPCPackagespublic2010-12-11 21:00
ReporterMichalis Kamburelis Assigned ToJonas Maebe  
Status resolvedResolutionduplicate 
Platformi386OSDebian GNU/Linux 
Summary0018197: EventLog always uses "dummy" implementation, not OS-specific, which breaks e.g. daemon under Unix
DescriptionIn trunk, src/dummy directory is inside the includedir in packages/fcl-extra/Makefile.fpc. Unfortunately, this means that files inside dummy/ dir override (are picked up first, at least on Linux) the "real" implementations inside unix/.

This means that TEventLog cannot really write to syslog: LogType = ltSystem (the default) is handled by the src/dummy/ implementation, which simply fallbacks to writing xxx.log file instead of opening the syslog.

Testcase: try tstelcmd demo (after applying 0018196 to make it compileable again). It should write to syslog, but instead it creates tstelcmd.log file. By adding debug writeln inside fcl-base/src/dummy/ (e.g. at the beginning of TEventLog.ActivateSystemLog) we can confirm that indeed the "dummy" implementation is used, instead of the Unix one.

Removing src/dummy dir from includedir in fcl-base/Makefile.fpc (and regenerating with fpcmake) makes things working. This compiles good eventlog unit, which in turn means that compiled tstelcmd works correctly.

This bug also makes the daemon demo broken under Linux with my tests. I didn't dig in too deep, but the daemonization (running ./daemon --run -b) simply fails, i.e. parent exits but the child process (which should become a daemon) dies too. Probably because the child tries to write a file that is already closed by the parent process? After removing src/dummy, the daemon started working (and logging to syslog) perfectly.

Note that the same error is repeated inside packages/fcl-extra/Makefile.fpc. Fortunately, packages/fcl-extra/src/dummy is empty for now, so it didn't cause any actual problems yet.
TagsNo tags attached.
Fixed in Revision
Attached Files


duplicate of 0015222 confirmedTomas Hajny Dummy instead of unix include files are used. 


There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2010-12-11 20:18 Michalis Kamburelis New Issue
2010-12-11 21:00 Jonas Maebe Relationship added duplicate of 0015222
2010-12-11 21:00 Jonas Maebe Duplicate ID 0 => 15222
2010-12-11 21:00 Jonas Maebe Status new => resolved
2010-12-11 21:00 Jonas Maebe Resolution open => duplicate
2010-12-11 21:00 Jonas Maebe Assigned To => Jonas Maebe