packages: snownews/snownews-home_etc.patch - make pidfile home_etc aware
adamg
adamg at pld-linux.org
Fri Feb 12 00:11:24 CET 2010
Author: adamg Date: Thu Feb 11 23:11:24 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- make pidfile home_etc aware
---- Files affected:
packages/snownews:
snownews-home_etc.patch (1.3 -> 1.4)
---- Diffs:
================================================================
Index: packages/snownews/snownews-home_etc.patch
diff -u packages/snownews/snownews-home_etc.patch:1.3 packages/snownews/snownews-home_etc.patch:1.4
--- packages/snownews/snownews-home_etc.patch:1.3 Thu Feb 11 23:56:10 2010
+++ packages/snownews/snownews-home_etc.patch Fri Feb 12 00:11:18 2010
@@ -296,3 +296,31 @@
lastupdated = fopen (file, "r+");
if (lastupdated == NULL) {
lastupdated = fopen (file, "w+");
+--- snownews-1.5.12/main.c~ 2009-09-17 08:44:27.000000000 +0200
++++ snownews-1.5.12/main.c 2010-02-12 00:07:05.584649815 +0100
+@@ -42,6 +42,7 @@
+ #include "setup.h"
+ #include "io-internal.h"
+ #include "getopt.h"
++#include "etc_path.h"
+
+ extern struct feed *first_bak; /* For use with the signal handler. */
+ static int const pid_file_create = 1;
+@@ -57,7 +58,7 @@
+ char pid_path[512];
+ FILE *file;
+
+- snprintf(pid_path, sizeof(pid_path), "%s/.snownews/pid", getenv("HOME"));
++ snprintf(pid_path, sizeof(pid_path), "%s/.snownews/pid", set_config_dir());
+ if (action == pid_file_create) {
+ file = fopen(pid_path, "w");
+ if (file == NULL) {
+@@ -79,7 +80,7 @@
+ FILE *pidfile;
+ struct stat filetest;
+
+- snprintf(pid_path, sizeof(pid_path), "%s/.snownews/pid", getenv("HOME"));
++ snprintf(pid_path, sizeof(pid_path), "%s/.snownews/pid", set_config_dir());
+
+ if (stat (pid_path, &filetest) == 0) {
+ pidfile = fopen(pid_path, "r");
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/snownews/snownews-home_etc.patch?r1=1.3&r2=1.4&f=u
More information about the pld-cvs-commit
mailing list