8 pipekill - Send signal to a process on the other end of the given pipe filedescriptor
15 if [ .
${1:0:1} = .
- ]; then
22 if [ "$1" -ge 0 ] 2>/dev
/null
; then
24 pipe
=`readlink -n /proc/$$/fd/$my_fd`
25 pipe_number
=${pipe//[!0-9]/}
26 pipe
=`find /proc -maxdepth 3 -mindepth 3 -lname "pipe:\[$pipe_number\]" -print -quit 2>/dev/null`
27 other_pid
=${pipe:6}; other_pid
=${other_pid%%/*}
29 if [ -n "$other_pid" ]; then
30 kill $signal "$other_pid"
32 echo "pipekill: piped process not found." >&2
36 echo "Usage: pipekill [-<signal>] [<fdnum>]" >&2