title: how do i spawn a process in perl without it becoming defunct or a zombie when the parent exits?
body: <p>I have a perl script which i'd like to spawn a process. It can take a while and most times the parent script will exit. How do I spawn this process so that when the parent is gone it wont turn into a zombie or a defunct process when its done?</p>
  
  <p>edit: I think ive found two methods. Hopefully someone could tell me which one is more appropriate?</p>
  
  <ol>
  <li>setting $SIG{CHLD} = 'IGNORE';</li>
  <li>use POSIX 'setsid';</li>
  </ol>
  
  <p>edit: The spawned process is also going to be another perl script.</p>