mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Added raise(3).
This commit is contained in:
parent
309416c291
commit
35347ec709
2 changed files with 9 additions and 2 deletions
|
@ -74,6 +74,7 @@ void SIG_ERR(int signum);
|
|||
|
||||
sighandler_t signal(int signum, sighandler_t handler);
|
||||
int kill(pid_t pid, int sig);
|
||||
int raise(int sig);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/******************************************************************************
|
||||
|
||||
COPYRIGHT(C) JONAS 'SORTIE' TERMANSEN 2011.
|
||||
COPYRIGHT(C) JONAS 'SORTIE' TERMANSEN 2011, 2012.
|
||||
|
||||
This file is part of LibMaxsi.
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
|||
signal.cpp
|
||||
Handles the good old unix signals.
|
||||
|
||||
******************************************************************************/
|
||||
*******************************************************************************/
|
||||
|
||||
#include <libmaxsi/platform.h>
|
||||
#include <libmaxsi/string.h>
|
||||
|
@ -28,6 +28,7 @@
|
|||
#include <libmaxsi/syscall.h>
|
||||
#include <libmaxsi/process.h>
|
||||
#include <libmaxsi/signal.h>
|
||||
#include <unistd.h>
|
||||
#include <signal.h>
|
||||
|
||||
namespace Maxsi
|
||||
|
@ -123,5 +124,10 @@ namespace Maxsi
|
|||
{
|
||||
return SysKill(pid, signum);
|
||||
}
|
||||
|
||||
extern "C" int raise(int signum)
|
||||
{
|
||||
kill(getpid(), signum);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue