def spawn_independent(command, shell=False):
    if sys.platform == 'win32':
        if isinstance(command, STRING_BASE_CLASS):
            command = 'start /b ' + command
        else:
            command.insert(0, 'start')
            command.insert(1, '/b')
        Popen(command, shell=True)
    elif sys.platform == 'darwin':
        pid = os.fork()
        if pid:
            return
        else:
            os.setpgrp()
            if isinstance(command, STRING_BASE_CLASS):
                tmp = quoted_split(command)
            else:
                tmp = command
            os.execv(tmp[0], tmp)
    else:
        pid = os.fork()
        if pid:
            return
        else:
            os.setpgrp()
            Popen(command, shell=shell)
            sys.exit(0)
Given a command suitable for 'Popen', open the process such that if this
dataset/ETHPy150Open enthought/envisage/envisage/plugins/remote_editor/communication/util.py/spawn_independent