Skip to content
Snippets Groups Projects

Fix process management

Merged Yaroslav Dynnikov requested to merge 56-process-management into master
All threads resolved!

b6cf01a4 refactor: make path to std::process::exit shorter

This patch reduces the variable passing trace length. Instead of returning it from function to function, call exit() in place.

The trace of exit code before the patch:

std::process::exit() <- main <- main_run <- fork(child) <- tarantool_main

And now:

std::process::exit() <- tarantool_main

The type safety is ensured at compilation time by using ! type for fn main(). See https://doc.rust-lang.org/reference/types/never.html

5b5d25f3 Handle supervisor termination in child

Handle supervisor termination in child

We don't want a child process to live without the supervisor.

Usually, supervisor waits for child forever and retransmits termination signals. But if the parent is killed with a SIGKILL there's no way to pass anything.

This patch supplies a child process with a supervisor_fuse fiber. It tries to read from a pipe (that supervisor never writes to), and if the writing end is closed, it means the supervisor has terminated. In this case, child process terminates too.

Part of #56 (closed)

c3af1724 Forward signals from supervisor to child

That's it.

Close #56 (closed)

Edited by Yaroslav Dynnikov

Merge request reports

Merge request pipeline #3962 passed

Merge request pipeline passed for c3af1724

Approval is optional

Merged by Yaroslav DynnikovYaroslav Dynnikov 2 years ago (Apr 26, 2022 11:59am UTC)

Merge details

  • Changes merged into master with c3af1724.
  • Deleted the source branch.
  • Auto-merge enabled

Pipeline #3990 passed

Pipeline passed for c3af1724 on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading