Bug Tracker item #2842529, was opened at 2009-08-22 12:53 Message generated for change (Comment added) made by valroff You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126467&aid=2842529&group_id=250683
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: daemon Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Julien Valroff (valroff) Assigned to: Nobody/Anonymous (nobody) Summary: PID file not re-created on SIGHUP Initial Comment: When sending a SIGHUP to dspam daemon, the PID file is not re-created if the ServerPID configuration option is set in dspam.conf. When running dspam daemon as non-privileged user, dspam log shows an error when creating the PID file: Aug 18 16:51:53 nix dspam[5652]: Reloading configuration Aug 18 16:51:53 nix dspam[5652]: received signal. waiting for processing threads to exit. Aug 18 16:51:53 nix dspam[5652]: daemon is down. Aug 18 16:51:53 nix dspam[5652]: reloading configuration Aug 18 16:51:53 nix dspam[5652]: Unable to open file for writing: �"#006#010#010##006#...@##006#010: Permission denied The file is most of the time different and it *seems* these are random portions of the dspam.conf file. I have been able to identify where the error comes from, it is in dspam.c, around line 3981: if (pidfile) { FILE *file; file = fopen(pidfile, "w"); if (file == NULL) { LOG(LOG_ERR, ERR_IO_FILE_WRITE, pidfile, strerror(errno)); } else { fprintf(file, "%ld\n", (long) getpid()); fclose(file); } } Changing the value of ServerPID to something different than the default leads to the same behaviour, but when not using the ServerPID configuration option, everything works as expected. I can reproduce it easily in virtual box running Debian lenny, using the latest git code with a very basic configuration. Cheers, Julien ---------------------------------------------------------------------- >Comment By: Julien Valroff (valroff) Date: 2009-09-25 17:47 Message: The default one ;) /var/run/dspam/dspam.pid Cheers, Julien ---------------------------------------------------------------------- Comment By: Stevan Bajic (sbajic) Date: 2009-09-25 13:46 Message: And what value do you have for ServerPID in your configuration? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126467&aid=2842529&group_id=250683 ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ Dspam-devel mailing list Dspam-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspam-devel