Linux-Bulgaria.ORG
навигация

 

начало

пощенски списък

архив на групата

семинари ...

документи

как да ...

 

 

Предишно писмо Следващо писмо Предишно по тема Следващо по тема По Дата По тема (thread)

lug-bg: Re: question


  • Subject: lug-bg: Re: question
  • From: mecho@xxxxxxxxxx (Mr Mecho Puh)
  • Date: Mon, 03 Sep 2001 02:46:13 +0100



#!/bin/sh
# replace ping 127.0.0.1 with your command

TIMEOUT=5
ping 127.0.0.1 & CMDPID=!$

#start watchdog
(sleep ${TIMEOUT}; kill -9 ${CMDPID}) &
WATCHDOGPID=$!

#wait for command
wait ${CMDPID}
kill ${WATCHDOGPID} >/dev/null 2>&1

# more advanced script
# http://www.oase-shareware.org/shell/scripts/quickies/timeout


-- 
Mecho Puh
===========================================================================
A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers)
http://www.linux-bulgaria.org/ Hosted by Internet Group Ltd. - Stara Zagora




 

наши приятели

 

линукс за българи
http://linux-bg.org

FSA-BG
http://fsa-bg.org

OpenFest
http://openfest.org

FreeBSD BG
http://bg-freebsd.org

KDE-BG
http://kde.fsa-bg.org/

Gnome-BG
http://gnome.cult.bg/

проект OpenFMI
http://openfmi.net

NetField Forum
http://netField.ludost.net/forum/

 

 

Linux-Bulgaria.ORG

Mailing list messages are © Copyright their authors.