[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sleep defunct

From: Bob Proulx
Subject: Re: Sleep defunct
Date: Mon, 3 Feb 2003 10:36:18 -0700
User-agent: Mutt/1.3.28i

Pavan Kumar Purohit wrote:
> thanks for the mail. I experiance the same problem in /bin/bash

Oh well.  A good crosscheck regardless.

> The Shell code is very simple. I excute the program binary and sleep for
> 180 seconds in an infinate loop(while(1)).

Something like this?

  while true; do
    sleep 180

There is no reason to see a defunct process with a loop such as that.

> Do you think that is is due to swap space (since there is no I/O request)
> that the process is killed.

If so then you should see some indication that you are running out of
virtual memory.

> One observation I made is if I increase the sleep duration the program
> runs for a longer time.

Are you running the command in the background?  If you run background
tasks then you need to wait for them.  Read the shell documentation on
the 'wait' command for more details.

> I am sort of newbee. and I am sorry if I am wasting your time.
> Is there an alternate command for sleep in shell?.

No, 'sleep' is a good command for that.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]