Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
aa1bbe32
Commit
aa1bbe32
authored
13 years ago
by
Nat Goodspeed
Browse files
Options
Downloads
Patches
Plain Diff
Make LLProcess::Params streamable; use that in LLExternalEditor.
parent
b9a03b95
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
indra/llcommon/llprocess.cpp
+15
-0
15 additions, 0 deletions
indra/llcommon/llprocess.cpp
indra/llcommon/llprocess.h
+4
-0
4 additions, 0 deletions
indra/llcommon/llprocess.h
indra/newview/llexternaleditor.cpp
+2
-12
2 additions, 12 deletions
indra/newview/llexternaleditor.cpp
with
21 additions
and
12 deletions
indra/llcommon/llprocess.cpp
+
15
−
0
View file @
aa1bbe32
...
...
@@ -81,6 +81,21 @@ bool LLProcess::isRunning(void)
return
(
mProcessID
!=
0
);
}
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
LLProcess
::
Params
&
params
)
{
std
::
string
cwd
(
params
.
cwd
);
if
(
!
cwd
.
empty
())
{
out
<<
"cd '"
<<
cwd
<<
"': "
;
}
out
<<
'"'
<<
std
::
string
(
params
.
executable
)
<<
'"'
;
BOOST_FOREACH
(
const
std
::
string
&
arg
,
params
.
args
)
{
out
<<
"
\"
"
<<
arg
<<
'"'
;
}
return
out
;
}
/*****************************************************************************
* Windows specific
*****************************************************************************/
...
...
This diff is collapsed.
Click to expand it.
indra/llcommon/llprocess.h
+
4
−
0
View file @
aa1bbe32
...
...
@@ -31,6 +31,7 @@
#include
"llsdparam.h"
#include
<boost/shared_ptr.hpp>
#include
<boost/noncopyable.hpp>
#include
<iosfwd>
// std::ostream
#if LL_WINDOWS
#define WIN32_LEAN_AND_MEAN
...
...
@@ -124,4 +125,7 @@ class LL_COMMON_API LLProcess: public boost::noncopyable
bool
mAutokill
;
};
/// for logging
LL_COMMON_API
std
::
ostream
&
operator
<<
(
std
::
ostream
&
,
const
LLProcess
::
Params
&
);
#endif // LL_LLPROCESS_H
This diff is collapsed.
Click to expand it.
indra/newview/llexternaleditor.cpp
+
2
−
12
View file @
aa1bbe32
...
...
@@ -74,12 +74,7 @@ LLExternalEditor::EErrorCode LLExternalEditor::setCommand(const std::string& env
llinfos
<<
"Adding the filename marker ("
<<
sFilenameMarker
<<
")"
<<
llendl
;
}
llinfos
<<
"Setting command ["
<<
bin_path
;
BOOST_FOREACH
(
const
std
::
string
&
arg
,
mProcessParams
.
args
)
{
llcont
<<
"
\"
"
<<
arg
<<
"
\"
"
;
}
llcont
<<
"]"
<<
llendl
;
llinfos
<<
"Setting command ["
<<
mProcessParams
<<
"]"
<<
llendl
;
return
EC_SUCCESS
;
}
...
...
@@ -108,12 +103,7 @@ LLExternalEditor::EErrorCode LLExternalEditor::run(const std::string& file_path)
}
// Run the editor.
llinfos
<<
"Running editor command ["
<<
std
::
string
(
params
.
executable
);
BOOST_FOREACH
(
const
std
::
string
&
arg
,
params
.
args
)
{
llcont
<<
"
\"
"
<<
arg
<<
"
\"
"
;
}
llcont
<<
"]"
<<
llendl
;
llinfos
<<
"Running editor command ["
<<
params
<<
"]"
<<
llendl
;
// Prevent killing the process in destructor.
params
.
autokill
=
false
;
return
LLProcess
::
create
(
params
)
?
EC_SUCCESS
:
EC_FAILED_TO_RUN
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment