officeipcthread.cxx (cfd52e18) officeipcthread.cxx (81afc36f)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 486 unchanged lines hidden (view full) ---

495 PipeMode nPipeMode = PIPEMODE_DONTKNOW;
496 do
497 {
498 OSecurity &rSecurity = Security::get();
499 // #119950# Try to connect pipe first. If connected, means another instance already launched.
500 if( pThread->maPipe.create( pThread->maPipeIdent.getStr(), OPipe::TOption_Open, rSecurity ))
501 {
502 // #119950# Test if launched in a new terminal session for same user. On Windows platform, normally a user is restricted
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 486 unchanged lines hidden (view full) ---

495 PipeMode nPipeMode = PIPEMODE_DONTKNOW;
496 do
497 {
498 OSecurity &rSecurity = Security::get();
499 // #119950# Try to connect pipe first. If connected, means another instance already launched.
500 if( pThread->maPipe.create( pThread->maPipeIdent.getStr(), OPipe::TOption_Open, rSecurity ))
501 {
502 // #119950# Test if launched in a new terminal session for same user. On Windows platform, normally a user is restricted
503 // to have only one terminal session. But if mutiple terminal session for one user is allowed, crash will happen if launched
503 // to have only one terminal session. But if multiple terminal session for one user is allowed, crash will happen if launched
504 // OpenOffice from more than one terminal session. So need to detect and prevent this happen.
505
506 // Will try to create a same name pipe. If creation is successfully, means current instance is launched in a new session.
507 vos::OPipe maSessionPipe;
508 if ( maSessionPipe.create( pThread->maPipeIdent.getStr(), OPipe::TOption_Create, rSecurity )) {
509 // Can create a pipe with same name. This can only happen in multiple terminal session environment on Windows platform.
510 // Will display a warning dialog and exit.
511 return IPC_STATUS_MULTI_TS_ERROR;

--- 492 unchanged lines hidden ---
504 // OpenOffice from more than one terminal session. So need to detect and prevent this happen.
505
506 // Will try to create a same name pipe. If creation is successfully, means current instance is launched in a new session.
507 vos::OPipe maSessionPipe;
508 if ( maSessionPipe.create( pThread->maPipeIdent.getStr(), OPipe::TOption_Create, rSecurity )) {
509 // Can create a pipe with same name. This can only happen in multiple terminal session environment on Windows platform.
510 // Will display a warning dialog and exit.
511 return IPC_STATUS_MULTI_TS_ERROR;

--- 492 unchanged lines hidden ---