path: tkdesk_2.0-12/contrib/appbar-dialup.tcl.xisp # Find the pid of a given command... proc dsk_dialup_running {cmd} { if [catch {set pid [exec /sbin/pidof -s [lindex [split $cmd] 0]]}] { set pid 0 } path: tkdesk_2.0-12/contrib/appbar-dialup.tcl.xisp # Bugs: # # This uses the 'pidof' (i.e. 'killall') program to find process pids. # If you have more than one Xisp (or whatever) running on your system, # you will likely lose. I had a better algorithm, but... um, my dog path: tkdesk_2.0-12/contrib/appbar-dialup.tcl.xisp # ate it. Yeah, that's the ticket. My dog ate it right before the # aliens dognapped him. (By the way, on my RedHat distribution, # kill is in /bin, killall is in /usr/bin/, and pidof is in /sbin. # Now I'm a dyed-in-the-wool unix bigot, but still... am I the only # one who thinks there's something wrong with that picture?)