[asterisk-users] [Linux/Python 2.4.2] Forking Python doesn't work

Michiel van Baak michiel at vanbaak.info
Wed Feb 13 07:25:52 CST 2008


On 13:46, Wed 13 Feb 08, Vincent wrote:
> Hello
> 
> 	When a call comes in, I'd like to fork a Python script that
> broadcasts a message so that users see the CID name + number pop up on
> their computer screen, and simultaneously ring their phones.
> 
> The following script doesn't work as planned: It waits until the
> script ends before moving on to the next step, which is Dial():
> 
> In another forum, people told me that I should fork twice. Is that
> really necessary?
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/278731

If you want it to detach the program from it's parent you
need the double fork yes.

-- 

Michiel van Baak
michiel at vanbaak.eu
http://michiel.vanbaak.eu
GnuPG key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x71C946BD

"Why is it drug addicts and computer aficionados are both called users?"




More information about the asterisk-users mailing list