Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Menu
Open sidebar
n0r1sk
bosnd
Commits
c9400d2e
Commit
c9400d2e
authored
Jun 26, 2020
by
Martin Steinwender
Browse files
fix cmd run handling
parent
25517559
Changes
2
Hide whitespace changes
Inline
Side-by-side
bosnd
View file @
c9400d2e
No preview for this file type
processhandler.go
View file @
c9400d2e
...
...
@@ -48,14 +48,17 @@ func (bh *BosndHandler) run(command []string, notify bool) bool {
stdoutPipe
,
err
:=
cmd
.
StdoutPipe
()
if
err
!=
nil
{
channelError
<-
err
return
}
stderrPipe
,
err
:=
cmd
.
StderrPipe
()
if
err
!=
nil
{
channelError
<-
err
return
}
err
=
cmd
.
Start
()
if
err
!=
nil
{
channelError
<-
err
return
}
go
io
.
Copy
(
os
.
Stdout
,
stdoutPipe
)
go
io
.
Copy
(
os
.
Stderr
,
stderrPipe
)
...
...
@@ -65,7 +68,11 @@ func (bh *BosndHandler) run(command []string, notify bool) bool {
log
.
Info
(
aurora
.
Green
(
fmt
.
Sprintf
(
"Process %s %d started"
,
bh
.
Config
.
Cmd
.
Processname
,
id
)))
}
cmd
.
Wait
()
err
=
cmd
.
Wait
()
if
err
!=
nil
{
channelError
<-
err
return
}
channelMsg
<-
fmt
.
Sprintf
(
"Process %s %d exited"
,
bh
.
Config
.
Cmd
.
Processname
,
id
)
}()
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment