public jpvmTaskStatus pvm_tasks(jpvmConfiguration conf, int which) {
	    jpvmTaskStatus ret = null;
	    if(conf==null || which<0 || which>=conf.numHosts)
		return null;

	    try {
		jpvmBuffer buf = new jpvmBuffer();
		pvm_send(buf,conf.hostDaemonTids[which],
			jpvmDaemonMessageTag.jpvmdTaskStatus);
		jpvmMessage m = pvm_recv(jpvmDaemonMessageTag.jpvmdTaskStatus);
		ret = new jpvmTaskStatus();
		ret.hostName = conf.hostNames[which];
		ret.numTasks = m.buffer.upkint();
		if(ret.numTasks==0) {
			ret.taskNames = null;
			ret.taskTids = null;
			return ret;
		}
		ret.taskNames = new String[ret.numTasks];
		ret.taskTids = new jpvmTaskId[ret.numTasks];
		for(int i=0;i<ret.numTasks;i++)
			ret.taskNames[i] = m.buffer.upkstr();
		m.buffer.unpack(ret.taskTids,ret.numTasks,1);
	    }
	    catch (jpvmException jpe) {
		jpvmDebug.error("pvm_tasks, internal error");
	    }
	    return ret;
	}