fix: utility process exit code for graceful termination (reland) (#44733)

* chore: reland "fix: utility process exit code for graceful termination"

This reverts commit 1cae73ba09.

Co-authored-by: deepak1556 <hop2deep@gmail.com>

* fix: exit code on posix when killed via api

Co-authored-by: deepak1556 <hop2deep@gmail.com>

* chore: fix code style

Co-authored-by: Robo <hop2deep@gmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
This commit is contained in:
trop[bot] 2024-11-19 22:09:53 +01:00 committed by GitHub
parent d477926b5d
commit 39e50be043
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 30 additions and 49 deletions

View file

@ -76,7 +76,7 @@ class UtilityProcessWrapper final
void HandleTermination(uint64_t exit_code);
void PostMessage(gin::Arguments* args);
bool Kill() const;
bool Kill();
v8::Local<v8::Value> GetOSProcessId(v8::Isolate* isolate) const;
// mojo::MessageReceiver
@ -106,6 +106,7 @@ class UtilityProcessWrapper final
int stderr_read_fd_ = -1;
bool connector_closed_ = false;
bool terminated_ = false;
bool killed_ = false;
std::unique_ptr<mojo::Connector> connector_;
blink::MessagePortDescriptor host_port_;
mojo::Receiver<node::mojom::NodeServiceClient> receiver_{this};