summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--desktop/unx/source/start.c9
-rw-r--r--sal/osl/unx/pipe.cxx4
2 files changed, 9 insertions, 4 deletions
diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c
index 525fe22927e0..b072f0f01c25 100644
--- a/desktop/unx/source/start.c
+++ b/desktop/unx/source/start.c
@@ -323,10 +323,15 @@ get_pipe_path( rtl_uString *pAppPath )
if ( !pMd5hash )
rtl_uString_new( &pMd5hash );
- if ( access( PIPEDEFAULTPATH, R_OK|W_OK ) == 0 )
+ if ( access( PIPEDEFAULTPATH, W_OK ) == 0 )
rtl_uString_newFromAscii( &pResult, PIPEDEFAULTPATH );
- else
+ else if ( access( PIPEALTERNATEPATH, W_OK ) == 0 )
rtl_uString_newFromAscii( &pResult, PIPEALTERNATEPATH );
+ else
+ {
+ fprintf( stderr, "ERROR: no valid pipe path found.\n" );
+ exit( 1 );
+ }
rtl_uString_newFromAscii( &pTmp, "/OSL_PIPE_" );
rtl_uString_newConcat( &pResult, pResult, pTmp );
diff --git a/sal/osl/unx/pipe.cxx b/sal/osl/unx/pipe.cxx
index 93213952e382..37ac7ec91e8f 100644
--- a/sal/osl/unx/pipe.cxx
+++ b/sal/osl/unx/pipe.cxx
@@ -166,11 +166,11 @@ oslPipe SAL_CALL osl_psz_createPipe(const sal_Char *pszPipeName, oslPipeOptions
bool bNameTooLong = false;
oslPipe pPipe;
- if (access(PIPEDEFAULTPATH, R_OK|W_OK) == 0)
+ if (access(PIPEDEFAULTPATH, W_OK) == 0)
{
strncpy(name, PIPEDEFAULTPATH, sizeof(name));
}
- else if (access(PIPEALTERNATEPATH, R_OK|W_OK) == 0)
+ else if (access(PIPEALTERNATEPATH, W_OK) == 0)
{
strncpy(name, PIPEALTERNATEPATH, sizeof(name));
}