]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
common/admin_socket: add a command to raise a signal 53689/head
authorLeonid Usov <leonid.usov@ibm.com>
Tue, 26 Sep 2023 21:54:26 +0000 (00:54 +0300)
committerLeonid Usov <leonid.usov@ibm.com>
Thu, 12 Oct 2023 11:25:49 +0000 (14:25 +0300)
commit7cc54b2b7323096bf7394d8502ff232a78e0c355
treeb62e67fe6b6ec7afd90a4e63c3b0fbd96deae0d1
parentafd899d29fbd86caf915db8c59be1fb77f9ebb2d
common/admin_socket: add a command to raise a signal

The new command "raise <signal> [--after X]" accepts signals
in the forms: '9', '-9', 'kill', '-KILL'
When --after is specified, the program will fork to wait for the timeout

The forked instance will bail out if it detects that the parent PID has changed
which would indicate that the original parent has terminated.

Forking an instance allows to schedule delivery of signals even if the original
process is suspended, e.g.:

  ceph tell mds.a raise CONT --after 10
  ceph tell mds.a raise STOP

Signed-off-by: Leonid Usov <leonid.usov@ibm.com>
Fixes: https://tracker.ceph.com/issues/62882
src/common/admin_socket.cc
src/common/admin_socket.h
src/test/admin_socket.cc