On 03/02/2015 10:30 AM, Juergen Borleis wrote:
> Maybe you should do more validating tests.
> 
>  PROC_TO_KILL=`pidof data.hhp`
>  if [ -n "${PROC_TO_KILL}" ]; then
>      ps "${PROC_TO_KILL}" > /dev/null
>      if [ $? -eq 0 ]; then
>         kill "${PROC_TO_KILL}"
>      fi
>  fi

This is all racy, what about pkill?

Marc
-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to