Skip to content

Commit

Permalink
fix: do not start obsolete daemon watcher process
Browse files Browse the repository at this point in the history
Before arduino/arduino-cli#488, IDE2 required a way to stop the daemon
process if the parent (backend) process crashed. However, this mechanism
is no longer necessary as the CLI daemon process is not actually a true
daemon process.

Signed-off-by: Akos Kitta <[email protected]>
  • Loading branch information
Akos Kitta authored and kittaakos committed Aug 20, 2023
1 parent 2aae9e0 commit 57fa18b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 39 deletions.
17 changes: 0 additions & 17 deletions arduino-ide-extension/src/node/arduino-daemon-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
} from '@theia/core/lib/common/disposable';
import { Event, Emitter } from '@theia/core/lib/common/event';
import { deepClone } from '@theia/core/lib/common/objects';
import { environment } from '@theia/application-package/lib/environment';
import { EnvVariablesServer } from '@theia/core/lib/common/env-variables';
import { BackendApplicationContribution } from '@theia/core/lib/node/backend-application';
import { ArduinoDaemon, NotificationServiceServer } from '../common/protocol';
Expand Down Expand Up @@ -71,22 +70,6 @@ export class ArduinoDaemonImpl
const cliPath = this.getExecPath();
this.onData(`Starting daemon from ${cliPath}...`);
const { daemon, port } = await this.spawnDaemonProcess();
// Watchdog process for terminating the daemon process when the backend app terminates.
spawn(
process.execPath,
[
join(__dirname, 'daemon-watcher.js'),
String(process.pid),
String(daemon.pid),
],
{
env: environment.electron.runAsNodeEnv(),
detached: true,
stdio: 'ignore',
windowsHide: true,
}
).unref();

this.toDispose.pushAll([
Disposable.create(() => {
if (daemon.pid) {
Expand Down
22 changes: 0 additions & 22 deletions arduino-ide-extension/src/node/daemon-watcher.ts

This file was deleted.

0 comments on commit 57fa18b

Please sign in to comment.