Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
T
tangled
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
eriksson monteiro
tangled
Commits
a7575a36
Commit
a7575a36
authored
Jul 02, 2021
by
Eriksson Monteiro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kill millix node process when the tangled browsers is stopped
parent
5be0bec4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
content/browser/browser_main_loop.cc
content/browser/browser_main_loop.cc
+8
-3
No files found.
content/browser/browser_main_loop.cc
View file @
a7575a36
...
...
@@ -11,6 +11,7 @@
#include <string>
#include <utility>
#include <vector>
#include <signal.h>
#include "base/base_switches.h"
#include "base/bind.h"
...
...
@@ -936,10 +937,10 @@ int BrowserMainLoop::CreateMillixNode() {
".
\\
nodejs
\\
node_modules
\\
@babel
\\
node
\\
bin
\\
babel-node.js"
);
#else
options
.
current_directory
=
dir_exe
.
AppendASCII
(
"millix_node"
);
base
::
CommandLine
millix_command_line
(
base
::
FilePath
(
"./nodejs/bin/node"
));
base
::
CommandLine
millix_command_line
(
dir_exe
.
AppendASCII
(
"millix_node/nodejs/bin/node"
));
millix_command_line
.
AppendArg
(
"./nodejs/lib/node_modules/@babel/node/bin/babel-node.js"
);
options
.
new_process_group
=
true
;
#endif
millix_command_line
.
AppendArg
(
"index.js"
);
// --enable-logging --v=2
...
...
@@ -950,6 +951,7 @@ int BrowserMainLoop::CreateMillixNode() {
LOG
(
ERROR
)
<<
"Unable to run millix node "
<<
millix_command_line
.
GetCommandLineString
().
c_str
();
return
-
1
;
}
LOG
(
ERROR
)
<<
"millix node process handle"
<<
millix_process_
->
Handle
();
return
0
;
}
...
...
@@ -1013,7 +1015,10 @@ void BrowserMainLoop::RunMainMessageLoopParts() {
void
BrowserMainLoop
::
ShutdownThreadsAndCleanUp
()
{
if
(
millix_process_
->
IsValid
())
{
millix_process_
->
Terminate
(
0
,
false
);
//millix_process_->Terminate(0, false);
auto
pgid
=
-
millix_process_
->
Pid
();
LOG
(
ERROR
)
<<
"killing process group id "
<<
pgid
;
kill
(
pgid
,
SIGTERM
);
}
if
(
!
created_threads_
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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