Interesting. I just ran a test on my shell account at my isp. I telneted in twice from windows, and in one of the windows I started the following program:
#!/usr/local/bin/perl while(1) { sleep 5; }
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!

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


In reply to Re: Do infinite loops ever die? by Eradicatore
in thread Do infinite loops ever die? by nysus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.