diff options
Diffstat (limited to 'shell/source/unix/exec/shellexec.cxx')
-rw-r--r-- | shell/source/unix/exec/shellexec.cxx | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/shell/source/unix/exec/shellexec.cxx b/shell/source/unix/exec/shellexec.cxx index f76c2c0517..b6eb6040cf 100644 --- a/shell/source/unix/exec/shellexec.cxx +++ b/shell/source/unix/exec/shellexec.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -33,9 +34,7 @@ #include <osl/file.hxx> #include <rtl/ustrbuf.hxx> -#ifndef _RTL_URI_H_ #include <rtl/uri.hxx> -#endif #include "shellexec.hxx" #include <com/sun/star/system/SystemShellExecuteFlags.hpp> @@ -82,7 +81,7 @@ namespace // private Sequence< OUString > SAL_CALL ShellExec_getSupportedServiceNames() { Sequence< OUString > aRet(1); - aRet[0] = OUString::createFromAscii("com.sun.star.sys.shell.SystemShellExecute"); + aRet[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sys.shell.SystemShellExecute")); return aRet; } } @@ -283,7 +282,13 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar pDesktopLaunch = NULL; } - OString cmd = aBuffer.makeStringAndClear(); + OString cmd = +#ifdef LINUX + // avoid blocking (call it in background) + OStringBuffer().append( "( " ).append( aBuffer ).append( " ) &" ).makeStringAndClear(); +#else + aBuffer.makeStringAndClear(); +#endif if ( 0 != pclose(popen(cmd.getStr(), "w")) ) { int nerr = errno; @@ -300,7 +305,7 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar OUString SAL_CALL ShellExec::getImplementationName( ) throw( RuntimeException ) { - return OUString::createFromAscii( SHELLEXEC_IMPL_NAME ); + return OUString(RTL_CONSTASCII_USTRINGPARAM( SHELLEXEC_IMPL_NAME )); } // ------------------------------------------------- @@ -329,3 +334,4 @@ Sequence< OUString > SAL_CALL ShellExec::getSupportedServiceNames( ) return ShellExec_getSupportedServiceNames(); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |