jehanne: fix sigwait; stub sigqueue
This commit is contained in:
28
newlib/libc/sys/jehanne/sigqueue.c
Normal file
28
newlib/libc/sys/jehanne/sigqueue.c
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* This file is part of Jehanne.
|
||||
*
|
||||
* Copyright (C) 2017 Giacomo Tesio <giacomo@tesio.it>
|
||||
*
|
||||
* This is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, version 3 of the License.
|
||||
*
|
||||
* Jehanne is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Jehanne. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include <u.h>
|
||||
#include <libc.h>
|
||||
#include <posix.h>
|
||||
#include <reent.h>
|
||||
|
||||
int
|
||||
sigqueue(pid_t pid, int signo, const union sigval value)
|
||||
{
|
||||
int *errnop = &_REENT->_errno;
|
||||
return POSIX_sigqueue(errnop, pid, signo, value);
|
||||
}
|
@ -21,11 +21,13 @@
|
||||
#include <reent.h>
|
||||
|
||||
int
|
||||
sigtimedwait(const PosixSignalMask *set, int *sig)
|
||||
sigwait(const PosixSignalMask *set, int *sig)
|
||||
{
|
||||
int err;
|
||||
PosixSignalInfo info;
|
||||
if(POSIX_sigtimedwait(&err, set, &info, nil) > 0)
|
||||
if(POSIX_sigtimedwait(&err, set, &info, nil) > 0){
|
||||
*sig = info.si_signo;
|
||||
return 0;
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
Reference in New Issue
Block a user