
/* Interact with getpid, mypopen and others to agree on what a "pid" is. */
int kill (int pid, int signal)
{
#ifdef notdef

	Not ready for this yet.

  #include <exec/execbase.h>
  struct ExecBase *SysBase;
  typedef struct Process * PROC;
  typedef struct Task * TASK;

    struct Process *pr;
    struct Task *t, *want = 0;


    /* Ignore process groups; return if signal is zero and pid was OK */
    if (signal <= 0) return (0);

    if (signal < _FSTSIG || signal > _NUMSIG + _FSTSIG - 1) {
	errno = EINVAL;
	return (-1);
    }

    Forbid();
    Disable();
    pr = (PROC)(SysBase->ThisTask);
    if (pr->pr_TaskNum && pr->pr_CLI == pid) want = t;

    for (t = (TASK)(SysBase->TaskReady.lh_Head);
			!want && t->tc_Node.ln_Succ;
			t = (TASK)(t->tc_Node.ln_Succ)) {
	pr = (PROC)t;
	if (!(pr->pr_TaskNum) || pr->pr_CLI != pid) continue;
	want = t;
    }

    for (t = (TASK)(SysBase->TaskWait.lh_Head);
			!want && t->tc_Node.ln_Succ;
			t = (TASK)(t->tc_Node.ln_Succ)) {
	pr = (PROC)t;
	if (!(pr->pr_TaskNum) || pr->pr_CLI != pid) continue;
	want = t;
    }
    Enable();
    Permit();

    if (want) {
	/* Do something here with ^[CDEF] and "break" */
	/* Amiga send break of some kind based on signal. */
	if (sending a signal to "want" works) return(0);
    }
    errno = EINVAL;		/* Unix uses ESRCH */
    return (-1);
#endif
    return (0);		/* For now -- Fix!!! */
}
