EDriver drv = ERT.find_driver(command);
if (drv == null) {
task = new EExecDriverTask(proc, name, command, portSetting);
} else {
task = new ESpawnDriverTask(proc, drv, command, portSetting);
}
} else if (name.elem1 == am_spawn_driver) {
EDriver drv = ERT.find_driver(command);
if (drv == null) {
throw ERT.badarg(portName, portSetting);
}
task = new ESpawnDriverTask(proc, drv, command, portSetting);
} else if (name.elem1 == am_spawn_executable) {
task = new EExecDriverTask(proc, name, command, portSetting);
}