diff options
-rw-r--r-- | vcl/generic/print/genprnpsp.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/vcl/generic/print/genprnpsp.cxx b/vcl/generic/print/genprnpsp.cxx index 3b11ec6e66b2..d215a1de9750 100644 --- a/vcl/generic/print/genprnpsp.cxx +++ b/vcl/generic/print/genprnpsp.cxx @@ -299,9 +299,11 @@ static bool passFileToCommandLine( const OUString& rFilename, const OUString& rC close( fd[ 1 ] ); } int status = 0; - waitpid( pid, &status, 0 ); - if( ! status ) - bSuccess = true; + if(waitpid( pid, &status, 0 ) != -1) + { + if( ! status ) + bSuccess = true; + } } else if( ! pid ) { |