'When initializing, an optional target may be given.
If no target is specified, self.eventLoop will be used.
If None is given, no target will be called (and it will be up
to the caller to properly shut down the forked process)
preProxy may be a dict of values that will appear as ObjectProxy
in the remote process (but do not need to be sent explicitly since
they are available immediately before the call to fork().
Proxies will be availabe as self.proxies[name].
If randomReseed is True, the built-in random and numpy.random generators
will be reseeded in the child process.'

def __init__(self, name=None, target=0, preProxy=None, randomReseed=True):

    self.hasJoined = False
    if (target == 0):
        target = self.eventLoop
    if (name is None):
        name = str(self)
    (conn, remoteConn) = multiprocessing.Pipe()
    proxyIDs = {}
    if (preProxy is not None):
        for (k, v) in preProxy.iteritems():
            proxyId = LocalObjectProxy.registerObject(v)
            proxyIDs[k] = proxyId
    ppid = os.getpid()
    pid = os.fork()
    if (pid == 0):
        self.isParent = False
        os.setpgrp()
        conn.close()
        sys.stdin.close()
        fid = remoteConn.fileno()
        os.closerange(3, fid)
        os.closerange((fid + 1), 4096)
        def excepthook(*args):
            import traceback
            traceback.print_exception(*args)
        sys.excepthook = excepthook
        for qtlib in ('PyQt4', 'PySide', 'PyQt5'):
            if (qtlib in sys.modules):
                sys.modules[(qtlib + '.QtGui')].QApplication = None
                sys.modules.pop((qtlib + '.QtGui'), None)
                sys.modules.pop((qtlib + '.QtCore'), None)
        atexit._exithandlers = []
        atexit.register((lambda : os._exit(0)))
        if randomReseed:
            if ('numpy.random' in sys.modules):
                sys.modules['numpy.random'].seed((os.getpid() ^ int(((time.time() * 10000) % 10000))))
            if ('random' in sys.modules):
                sys.modules['random'].seed((os.getpid() ^ int(((time.time() * 10000) % 10000))))
        RemoteEventHandler.__init__(self, remoteConn, (name + '_child'), pid=ppid)
        self.forkedProxies = {}
        for (name, proxyId) in proxyIDs.iteritems():
            self.forkedProxies[name] = ObjectProxy(ppid, proxyId=proxyId, typeStr=repr(preProxy[name]))
        if (target is not None):
            target()
    else:
        self.isParent = True
        self.childPid = pid
        remoteConn.close()
        RemoteEventHandler.handlers = {}
        RemoteEventHandler.__init__(self, conn, (name + '_parent'), pid=pid)
        atexit.register(self.join)
