changeset 290:fec37c150982

possible fix for corrupted output forking for separate messages
author Carl Byington <carl@five-ten-sg.com>
date Sat, 04 Jun 2011 10:52:47 -0700
parents cc8ee701f190
children bc23fba0da8e
files src/readpst.c xml/libpst.in
diffstat 2 files changed, 10 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/readpst.c	Fri May 27 11:36:49 2011 -0700
+++ b/src/readpst.c	Sat Jun 04 10:52:47 2011 -0700
@@ -330,8 +330,9 @@
                     DEBUG_INFO(("I have an email type %"PRIi32", but the folder type %"PRIi32" isn't an email folder. Skipping it\n", item->type, ff.type));
                 }
                 else {
+                    char *extra_mime_headers = NULL;
                     ff.item_count++;
-                    char *extra_mime_headers = NULL;
+                    if (mode == MODE_SEPARATE) mk_separate_file(&ff, (mode_EX) ? ".eml" : "");
                     if (mode == MODE_SEPARATE) {
                         // process this single email message, possibly forking
                         pid_t parent = getpid();
@@ -339,7 +340,6 @@
                         if (child == 0) {
                             // we are the child process, or the original parent if no children were available
                             pid_t me = getpid();
-                            mk_separate_file(&ff, (mode_EX) ? ".eml" : "");
                             write_normal_email(ff.output, ff.name, item, mode, mode_MH, &pstfile, save_rtf_body, &extra_mime_headers);
 #ifdef HAVE_FORK
 #ifdef HAVE_SEMAPHORE_H
--- a/xml/libpst.in	Fri May 27 11:36:49 2011 -0700
+++ b/xml/libpst.in	Sat Jun 04 10:52:47 2011 -0700
@@ -35,7 +35,7 @@
 
     <refentry id="readpst.1">
         <refentryinfo>
-            <date>2009-09-14</date>
+            <date>2011-05-27</date>
         </refentryinfo>
 
         <refmeta>
@@ -155,7 +155,9 @@
                     <term>-j <replaceable class="parameter">jobs</replaceable></term>
                     <listitem><para>
                         Specifies the maximum number of parallel jobs. Specify 0 to suppress
-                        running parallel jobs.
+                        running parallel jobs. Folders may be processed in parallel. Output
+                        formats that place each mail message in a separate file (-M, -S, -e)
+                        may process the contents of individual folders in parallel.
                     </para></listitem>
                 </varlistentry>
                 <varlistentry>
@@ -269,7 +271,7 @@
 
     <refentry id="lspst.1">
         <refentryinfo>
-            <date>2009-09-14</date>
+            <date>2011-05-27</date>
         </refentryinfo>
 
         <refmeta>
@@ -364,7 +366,7 @@
 
     <refentry id="pst2ldif.1">
         <refentryinfo>
-            <date>2009-09-14</date>
+            <date>2011-05-27</date>
         </refentryinfo>
 
         <refmeta>
@@ -532,7 +534,7 @@
 
     <refentry id="pst2dii.1">
         <refentryinfo>
-            <date>2009-09-14</date>
+            <date>2011-05-27</date>
         </refentryinfo>
 
         <refmeta>
@@ -665,7 +667,7 @@
 
     <refentry id="pst.5">
         <refentryinfo>
-            <date>2009-09-14</date>
+            <date>2011-05-27</date>
         </refentryinfo>
 
         <refmeta>