When running speed tests on multiple processes and using buffered output
(e.g. to a file),
    openssl speed rsa1024 -multi 8 > result
the child processes inherit pending buffered output from the parent process,
which in turn they send back in the result pipe to the parent. This confuses
the parser in the parent process and causes warning messages of the form
    Don't understand line 'Forked child 6' from child 7
The patch below makes sure the stdout buffer is flushed before forking,
avoiding this problem.

--- apps/speed.c~       2008-11-17 18:32:57.276608000 -0800
+++ apps/speed.c        2008-11-17 18:33:51.352770000 -0800
@@ -2760,6 +2760,8 @@
        for(n=0 ; n < multi ; ++n)
                {
                pipe(fd);
+               // children should not inherit buffered I/O for stdout
+               fflush(stdout);
                if(fork())
                        {
                        close(fd[1]);

 -artur-
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to