Skip to content

Conversation

@0xbrayo
Copy link
Member

@0xbrayo 0xbrayo commented Jan 9, 2026

Closes #190


Important

Ensure child processes terminate with parent using job objects on Windows and pipes on Unix in manager.rs.

  • Behavior:
    • On Windows, create_job_object() in manager.rs creates a job object to ensure child processes are killed when the parent is terminated.
    • On Unix, monitor_parent_process() in manager.rs uses a pipe to detect parent process termination and sends SIGTERM to child processes.
  • Dependencies:
    • Add libc to Cargo.toml for Unix-specific functionality.
    • Update winapi features in Cargo.toml to include jobapi2, handleapi, processthreadsapi, and winnt for job object management.
  • Misc:
    • Add error handling for job object creation and assignment in start_generic_module_thread() and start_notify_module_thread() in manager.rs.

This description was created by Ellipsis for 4cd0558. You can customize this summary. It will automatically update as commits are pushed.

@0xbrayo
Copy link
Member Author

0xbrayo commented Jan 9, 2026

Haven't tested on Windows yet

@0xbrayo 0xbrayo force-pushed the better-graceful-exits branch from 44008ff to 4cd0558 Compare January 13, 2026 21:32
@0xbrayo 0xbrayo marked this pull request as ready for review January 13, 2026 21:35
Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Changes requested ❌

Reviewed everything up to 4cd0558 in 2 minutes and 29 seconds. Click for details.
  • Reviewed 366 lines of code in 3 files
  • Skipped 1 files when reviewing.
  • Skipped posting 3 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. src-tauri/src/manager.rs:728
  • Draft comment:
    In the aw-notify thread, after manually reading stdout via BufReader (lines ~730–760), the call to wait_with_output may yield an Output with empty stdout since it was already consumed. Verify this is intended for logging purposes.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
2. src-tauri/src/manager.rs:490
  • Draft comment:
    There is duplicated logic between start_generic_module_thread and start_notify_module_thread. Consider refactoring shared code to improve maintainability.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
3. src-tauri/src/manager.rs:497
  • Draft comment:
    The error message on line 497 uses the placeholder {name}. Please verify if this is intentional, as it doesn't appear to interpolate a variable. If no variable is intended, consider removing or correcting the placeholder.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.

Workflow ID: wflow_Nb3Zc3XY6QalqJdy

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@0xbrayo
Copy link
Member Author

0xbrayo commented Jan 14, 2026

Tested on windows, works perfectly

@0xbrayo 0xbrayo force-pushed the better-graceful-exits branch from 4cd0558 to c2a73b8 Compare January 14, 2026 21:56
@0xbrayo 0xbrayo merged commit b623564 into ActivityWatch:master Jan 14, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Macos] Watchers are still active after logging out

1 participant