in reply to Detachment problm

so on every full hour the main program will start some other program

Well, if that is main, since you're not fork-ing before exec-ing, the main program replaces itself with the new program, in other words, there is no more main program running.

If you want to launch processes in the background, see if they're still running, kill them if they are, on win32 and unix, you can use Proc::Background

Zdravo!