LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] real time shell question...

[ILUG] real time shell question...

kevin lyda kevin at suberic.net
Thu Apr 5 16:40:05 IST 2001


On Thu, Apr 05, 2001 at 03:25:34PM +0100, Vincent Cunniffe wrote:
> Justin Mason wrote:
> > Paul J Collins said:

ok, these are all good, so i think i'll go with:

  for test in `foo -h | awk '{print $1}'`; do
    foo $test &
    foopid=$!

    secs=360
    while [ $secs -gt 0 ] && kill -0 $foopid; do
	sleep 1
	secs=`expr $secs - 1`
    done

    if kill -0 $foopid ; then
      kill -15 $foopid
    fi

    if wait $foopid; then
	# tell someone that something bad happened.
    fi
  done

wait - here's a problem.  the wait isn't getting the status.  hm.

kevin

-- 
kevin at suberic.net          can you decypher the hidden message?
fork()'ed on 37058400      fhsa jhs foiqrn kjan rvgn mv.  bvdf bvdfk fghdfgs
meatspace place: work      sjnf qrfrtfbmf?  zc fou djv eruhfgaa varuf haerf.
http://suberic.net/~kevin




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell