in reply to Do infinite loops ever die?
Then, In the other telnet window, I did the "ps -ef | grep perl" and saw the process just fine. I then killed the first telnet window that was running the perl program. I did the ps command again, and the while loop was still going!#!/usr/local/bin/perl while(1) { sleep 5; }
I guess I was going to tell you that if you don't put the process in the background like "test_program.pl&" (the & at the end means put the process in the background for most shells on unix I think), the process would die with the telnet session but this test proved me wrong. Anyway, any good sys admin would be keeping tabs on the server and kill your process if it were causing problems. They can tell when the owner put something in the background or stranded a process, and if the process is just sucking resources and not doing anything useful. You have nothing to worry about with infinite loops. Promise! ;)
And no_slogan definitely has a good point. There is always some freshmen in college that knows a little too much about fork and recursion and wants to "see what it will do to that nice workstation over there". I know, because my dad is the head of a college engineering computer network, and I hear lots of fun stories.
Justin Eltoft
"If at all god's gaze upon us falls, its with a mischievous grin, look at him" -- Dave Matthews
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Do infinite loops ever die?
by mr.nick (Chaplain) on Jun 13, 2001 at 05:54 UTC | |
by Eradicatore (Monk) on Jun 13, 2001 at 06:25 UTC | |
|
Re: Re: Do infinite loops ever die?
by extremely (Priest) on Jun 13, 2001 at 05:27 UTC | |
|
(tye)Re: Do infinite loops ever die?
by tye (Sage) on Jun 13, 2001 at 18:45 UTC | |
|
Re: Re: Do infinite loops ever die?
by TeKk9 (Scribe) on Jun 13, 2001 at 05:30 UTC |