home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
LIBSRC.ZOO
/
libsrc
/
local
/
kill.c
< prev
next >
Wrap
Text File
|
1992-03-08
|
692b
|
29 lines
#define INCL_DOSSIGNALS
#include <os2.h>
#include <signal.h>
#include <errno.h>
ULONG Dos32SendSignalException() asm ("Dos32SendSignalException");
ULONG Dos32RaiseException() asm ("Dos32RaiseException");
int kill (pid_t pid, int sig)
{ULONG rc;
EXCEPTIONREPORTRECORD ExceptRepRec;
if (sig > NSIG || sig < 1)
{
errno = EINVAL;
return (-1);
}
bzero (&ExceptRepRec, sizeof (EXCEPTIONREPORTRECORD));
ExceptRepRec.ExceptionNum = XCPT_FATAL_EXCEPTION | XCPT_CUSTOMER_CODE | sig;
/* ExceptRepRec.ExceptionNum = XCPT_ILLEGAL_INSTRUCTION;*/
rc = Dos32RaiseException ( &ExceptRepRec);
/* Dos32SendSignalException (pid, 10);*/
}