ReactOS
0.4.16-dev-91-g764881a
UConnect.c
Go to the documentation of this file.
1
#include "
syshdrs.h
"
2
3
#if !defined(NO_UNIX_DOMAIN_SOCKETS) && !defined(NO_SIGNALS)
4
5
extern
volatile
Sjmp_buf
gNetTimeoutJmp;
6
extern
volatile
Sjmp_buf
gPipeJmp;
7
8
int
9
UConnect
(
int
sfd,
const
struct
sockaddr_un
*
const
addr
,
int
ualen,
int
tlen)
10
{
11
int
result
;
12
vsio_sigproc_t
sigalrm;
13
14
if
(
SSetjmp
(gNetTimeoutJmp) != 0) {
15
alarm(0);
16
(
void
)
SSignal
(SIGALRM, (
sio_sigproc_t
) sigalrm);
17
errno
=
ETIMEDOUT
;
18
return
(
kTimeoutErr
);
19
}
20
21
sigalrm = (
vsio_sigproc_t
)
SSignal
(SIGALRM,
SIOHandler
);
22
alarm((
unsigned
int
) tlen);
23
24
errno
= 0;
25
do
{
26
result
=
connect
(sfd, (
struct
sockaddr
*)
addr
, ualen);
27
}
while
((
result
< 0) && (
errno
==
EINTR
));
28
29
alarm(0);
30
(
void
)
SSignal
(SIGALRM, (
sio_sigproc_t
) sigalrm);
31
return
(
result
);
32
}
/* UConnect */
33
34
#endif
35
EINTR
#define EINTR
Definition:
acclib.h:80
ETIMEDOUT
#define ETIMEDOUT
Definition:
errno.h:121
addr
GLenum const GLvoid * addr
Definition:
glext.h:9621
result
GLuint64EXT * result
Definition:
glext.h:11304
void
Definition:
nsiface.idl:2307
SIOHandler
void SIOHandler(int)
SSetjmp
#define SSetjmp(a)
Definition:
sio.h:39
vsio_sigproc_t
volatile sio_sigproc_t vsio_sigproc_t
Definition:
sio.h:124
SSignal
void(*)(int) SSignal(int signum, void(*handler)(int))
Definition:
sio.h:237
Sjmp_buf
#define Sjmp_buf
Definition:
sio.h:41
kTimeoutErr
#define kTimeoutErr
Definition:
sio.h:58
sio_sigproc_t
void(* sio_sigproc_t)(int)
Definition:
sio.h:123
errno
#define errno
Definition:
errno.h:18
syshdrs.h
connect
Definition:
winhttp_private.h:100
sockaddr_un
Definition:
wintirpc.h:88
sockaddr
Definition:
tcpcore.h:1189
UConnect
int UConnect(int, const struct sockaddr_un *const, int, int)
modules
rosapps
applications
net
ncftp
sio
UConnect.c
Generated on Fri Oct 4 2024 06:06:10 for ReactOS by
1.9.6