In bash I can find out if a program is running and do stuff if it is running or not running
the code in bash
How do I do the same thing in "C"Code:if [ `pstree | grep -o "progname" | head -n 1` = "progname" ]; then echo "program is running" else echo "program is not running" fi
Thanks