[ILUGC] Re: How to restart a perl script if it is stopped?

  • From: Balachandran Sivakumar <benignbala@xxxxxxxxx>
  • To: ilugc@xxxxxxxxxxxxx
  • Date: Wed, 27 Jul 2016 18:12:16 +0530

Hi Shirinivasan
On Mon, Jul 25, 2016 at 8:57 AM, Shrinivasan T <tshrinivasan@xxxxxxxxx>
wrote:


I have a perl script in a desktop which is doing web scrawling
continuously.
when the internet connection goes down sometimes, the script tries for 5
min. Then it dies.

I want the script to run again once the internet is connected,

How can we achieve this?


    You can probably fork in a loop i.e. fork  if there is a sigchld due to
the child process getting killed. Thanks

--
Thank you
Balachandran Sivakumar


_____________________________________
ILUGC List: http://www.freelists.org/list/ilugc
ILUGC Web: http://ilugc.in/

Other related posts: