Beispiel #1
0
int
msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg)
{
	int ret;

	ENTER_CANCEL_POINT(1);
	ret = HIDDEN(msgrcv)(msqid, msgp, msgsz, msgtyp, msgflg);
	LEAVE_CANCEL_POINT(ret == -1);
	return (ret);
}
Beispiel #2
0
int
msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg)
{
    int ret;

    ENTER_CANCEL_POINT(1);
    ret = HIDDEN(msgsnd)(msqid, msgp, msgsz, msgflg);
    LEAVE_CANCEL_POINT(ret == -1);
    return (ret);
}
int
connect(int s, const struct sockaddr *name, socklen_t namelen)
{
	int ret;

	ENTER_CANCEL_POINT(1);
	ret = HIDDEN(connect)(s, name, namelen);
	LEAVE_CANCEL_POINT(ret == -1);
	return (ret);
}
Beispiel #4
0
int
nanosleep(const struct timespec *timeout, struct timespec *remainder)
{
	int ret;

	ENTER_CANCEL_POINT(1);
	ret = HIDDEN(nanosleep)(timeout, remainder);
	LEAVE_CANCEL_POINT(1);
	return (ret);
}
Beispiel #5
0
int
closefrom(int fd)
{
	int ret;

	ENTER_CANCEL_POINT(0);
	ret = HIDDEN(closefrom)(fd);
	LEAVE_CANCEL_POINT(1);
	return (ret);
}
Beispiel #6
0
int
poll(struct pollfd *fds, nfds_t nfds, int timeout)
{
	int ret;

	ENTER_CANCEL_POINT(1);
	ret = HIDDEN(poll)(fds, nfds, timeout);
	LEAVE_CANCEL_POINT(ret == -1);
	return (ret);
}
ssize_t
recvmsg(int fd, struct msghdr *msg, int flags)
{
    ssize_t ret;

    ENTER_CANCEL_POINT(1);
    ret = HIDDEN(recvmsg)(fd, msg, flags);
    LEAVE_CANCEL_POINT(ret == -1);
    return (ret);
}
Beispiel #8
0
int
tcdrain(int fd)
{
	int ret;

	ENTER_CANCEL_POINT(1);
	ret = ioctl(fd, TIOCDRAIN, 0);
	LEAVE_CANCEL_POINT(ret == -1);
	return (ret);
}
Beispiel #9
0
int
wait4(pid_t wpid, int *status, int options, struct rusage *rusage)
{
	int ret;

	ENTER_CANCEL_POINT(1);
	ret = HIDDEN(wait4)(wpid, status, options, rusage);
	LEAVE_CANCEL_POINT(ret <= 0);
	return (ret);
}
Beispiel #10
0
ssize_t
sendmsg(int s, const struct msghdr *msg, int flags)
{
	ssize_t ret;

	ENTER_CANCEL_POINT(1);
	ret = HIDDEN(sendmsg)(s, msg, flags);
	LEAVE_CANCEL_POINT(ret <= 0);
	return (ret);
}
Beispiel #11
0
int
select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
    struct timeval *timeout)
{
	int ret;

	ENTER_CANCEL_POINT(1);
	ret = HIDDEN(select)(nfds, readfds, writefds, exceptfds, timeout);
	LEAVE_CANCEL_POINT(ret == -1);
	return (ret);
}