Re: Sending Signal to remote process

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 



[resending to list]

Depending on your exact use case, this might help:  Have an option to
ssh that causes it to print the PID of the user process on the remote
computer.
IIF you use session multiplexing, you can open another shell via the same SSH process and easily get the "other" child process (the sibling) via "pgrep -P $$": that asks for processes with the same parent PID.

Be careful to quote '$$' so that it's interpolated on the remote side only.


Even easier would be 'pkill -P $$', of course...


If you can't use session multiplexing, you might be able to find the interesting process via the other arguments to pgrep/pkill - like "-U", and/or specifying "-P $(pidof sshd)", etc.

_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev



[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux