2 #include <exec/execbase.h>
3 #include <proto/exec.h>
8 static BOOL
CheckTask(struct List
*tl
, pid_t pid
)
11 for (t
= tl
->lh_Head
; t
->ln_Succ
; t
= t
->ln_Succ
)
17 int kill(pid_t pid
, int sigs
)
22 if ((pid
== 0) || (sigs
< 0))
26 exec_sigs
= SIGBREAKF_CTRL_C
;
39 * b) In the TaskReady list
40 * c) In the TaskWait list
42 task_valid
= ((pid
== (pid_t
)FindTask(NULL
)) ||
43 CheckTask(&SysBase
->TaskReady
, pid
) ||
44 CheckTask(&SysBase
->TaskWait
, pid
));
46 if (task_valid
&& exec_sigs
)
47 Signal((struct Task
*)pid
, exec_sigs
);
51 return task_valid
? 0 : ESRCH
;