perlipc has some stuff you may want to try :

Complete Dissociation of Child from Parent In some cases (starting server processes, for instance) you'll want to + complete dissociate the child process from the parent. The easiest w +ay is to use: use POSIX qw(setsid); setsid() or die "Can't start a new session: $!"; However, you may not be on POSIX. The following process is reported to + work on most Unixish systems. Non-Unix users should check their Your +_OS::Process module for other solutions. * Open /dev/tty and use the TIOCNOTTY ioctl on it. See tty(4) for +details. * Change directory to / * Reopen STDIN, STDOUT, and STDERR so they're not connected to the + old tty. * Background yourself like this: fork && exit; * Ignore hangup signals in case you're running on a shell that doe +sn't automatically no-hup you: $SIG{HUP} = 'IGNORE'; # or whatever you'd like

The docs are a little different than an eariler version I found on the Net, so give it a try and see if that solves your problem. If not, look at the perlipc manpage excerpted from the Activestate's Perl UNIX user's e-mail list for a longer program.

----Asim, known to some as Woodrow.

Edit: chipmunk 2001-11-08


In reply to Re: Re: Re: Starting a process in the background that lives after perl dies. by Asim
in thread Starting a process in the background that lives after perl dies. by ehdonhon

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.