If you want something comparable to "&" in Unix, I recommend fork and exec, not threads. If you want sound advice from us, rather than random guessing, you will need to provide more background and context of your application and what you are trying to achieve. And you will need to post some code.

Comment on
Re^3: Fork exec and not wait?
Replies are listed 'Best First'.

OK, thanks for the replies. I hope my tone wasn't dismissive of anyone's suggestions, I certainly didn't mean to be and I am grateful for anyone taking the time to respond!

Here is some code. I pass a string from a webpage and I then need to bring up an ssh tunnel in the background (I know I could do this using some existing modules instead of the system call but I stumbled across this issues and I'd like to figure it out this way!

So, if I pass the CGI param via the command line I get the tunnel up and sits at the remote login prompt (after a sucessful login) it doesn't continue on to the XMLRPC part. In a browser, the headers (which I am calling from a templat e not included in this code) don't get printed, the script just hangs.

I am starting to think I am doing something really trivially, stupid at this stage?