[PATCH 0/1] open debug file with append mode.

ms <[email protected]>
Newsgroups gmane.network.slrn.user
Message-ID <[email protected]>
Running `slrnpull --debug x` does not write the debug output back to
file x if file x already exist before. This patch fix this.

------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
00-debug-append.patch (text/x-patch, 595 B)
diff --git a/src/slrnpull.c b/src/slrnpull.c
index 3e1e495..f44cb16 100644
--- a/src/slrnpull.c
+++ b/src/slrnpull.c
@@ -2294,10 +2294,10 @@ int main (int argc, char **argv) /*{{{*/
 		  fclose (Slrn_Debug_Fp);
 		  Slrn_Debug_Fp = NULL;
 	       }
-	     fd = open (*argv, O_WRONLY | O_CREAT, S_IREAD | S_IWRITE);
+	     fd = open (*argv, O_WRONLY | O_CREAT | O_APPEND, S_IREAD | S_IWRITE);
 	     if (fd != -1)
 	       {
-		  if (NULL == (Slrn_Debug_Fp = fdopen (fd, "w")))
+		  if (NULL == (Slrn_Debug_Fp = fdopen (fd, "wa")))
 		    close (fd);
 	       }
 	     if (Slrn_Debug_Fp == NULL)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.