Cheap and cheerful pwait for linux

| No Comments | No TrackBacks
#!/bin/bash -p

if [ $# -eq 0 ]; then
    echo "Usage: $(basename $0) " 1>&2
    exit 1
fi

while [ -d /proc/$1 ]; do sleep 0.5; done
If I implemented it using inotify, I presume I can get rid of the sleep, but that entails compiled code.

No TrackBacks

TrackBack URL: http://www.petesh.com/scgi-bin/MT/mt-tb.cgi/219

Leave a comment

About this Entry

This page contains a single entry by Pete Shanahan published on September 24, 2008 7:42 PM.

What does it mean by 'security code accepted' was the previous entry in this blog.

Touch typists of the world unite is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.