Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F621015
MyProcess.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
553 B
Referenced Files
None
Subscribers
None
MyProcess.cpp
View Options
#include
"MyProcess.h"
int
misc2::runCommand
(
QString
const
&
cmd
,
QByteArray
const
*
in
,
QByteArray
*
out
)
{
Process
proc
;
proc
.
start
(
cmd
,
(
bool
)
in
);
if
(
in
)
{
int
n
=
in
->
size
();
if
(
n
>
0
)
{
if
(
n
>
65536
)
n
=
65536
;
proc
.
writeInput
(
in
->
data
(),
n
);
}
proc
.
closeInput
(
false
);
}
int
r
=
proc
.
wait
();
if
(
proc
.
outbytes
.
empty
())
{
out
->
clear
();
}
else
{
out
->
append
(
&
proc
.
outbytes
[
0
],
proc
.
outbytes
.
size
());
}
return
r
;
}
int
misc2::runCommand
(
QString
const
&
cmd
,
QByteArray
*
out
)
{
return
runCommand
(
cmd
,
nullptr
,
out
);
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Sat, Nov 14, 6:40 PM (17 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
131138
Default Alt Text
MyProcess.cpp (553 B)
Attached To
Mode
R77 Guitar
Attached
Detach File
Event Timeline