fix lttd append
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Thu, 23 Jul 2009 19:34:54 +0000 (19:34 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Thu, 23 Jul 2009 19:34:54 +0000 (19:34 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@3419 04897980-b3bd-0310-b5e0-8ef037075253

trunk/ltt-control/configure.in
trunk/ltt-control/lttd/lttd.c

index 846d33210416b5265f91482c45077c69ac5a918b..6adcbaa6a8a9c8bc9c04b65e3a144fc9242beb38 100644 (file)
@@ -23,7 +23,7 @@
 AC_PREREQ(2.57)
 AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS)
 #AC_WITH_LTDL  # not needed ?
-AM_INIT_AUTOMAKE(ltt-control,0.68-19062009)
+AM_INIT_AUTOMAKE(ltt-control,0.69-23072009)
 AM_CONFIG_HEADER(config.h)
 AM_PROG_LIBTOOL
 
index ceae377bd75f48cde76d8c0361ae30569d2c35f1..f21c411eb8940de479fb62980917c6880fae7e99 100644 (file)
@@ -316,12 +316,16 @@ int open_buffer_file(char *filename, char *path_channel, char *path_trace,
                                path_trace);
 
                        fd_pairs->pair[fd_pairs->num_pairs-1].trace = 
-                               open(path_trace, O_WRONLY|O_APPEND,
+                               open(path_trace, O_WRONLY,
                                                S_IRWXU|S_IRWXG|S_IRWXO);
-
                        if(fd_pairs->pair[fd_pairs->num_pairs-1].trace == -1) {
                                perror(path_trace);
                        }
+                       ret = lseek(fd_pairs->pair[fd_pairs->num_pairs-1].trace,
+                                   0, SEEK_END);
+                       if (ret < 0) {
+                               perror(path_trace);
+                       }
                } else {
                        printf("File %s exists, cannot open. Try append mode.\n", path_trace);
                        open_ret = -1;
This page took 0.02441 seconds and 4 git commands to generate.