#!/bin/sh

# signals a program started by run without signalling the run process
# itself.
# this is a dirty hack that is only provided until run can do that.

case $1 in
  -*) SIG="$1";
      shift;
      ;;
  default)
      SIG="-TERM";
      ;;
esac

kill $SIG `isrunning $@ | sed "s/^.*is running as pid \([0-9]*\).*/\1/"`
