2 #include <exec/execbase.h>
3 #include <proto/exec.h>
4 #include <sys/signal.h>
8 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
;
34 task_valid
= (CheckTask(&SysBase
->TaskReady
, pid
) || CheckTask(&SysBase
->TaskWait
, pid
));
35 if (task_valid
&& exec_sigs
)
36 Signal((struct Task
*)pid
, exec_sigs
);
38 return task_valid
? 0 : ESRCH
;