Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
openldap
OpenLDAP
Commits
1677f178
Commit
1677f178
authored
Jul 27, 2002
by
Kurt Zeilenga
Browse files
ITS
#1985
fix: blind commit
parent
2f9b89b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/back-shell/fork.c
View file @
1677f178
...
...
@@ -119,17 +119,24 @@ make_surrogate_parent( void )
char
control
[
CMSG_SPACE
(
sizeof
(
io
))];
}
control_un
;
struct
cmsghdr
*
cmptr
;
# endif
/* clear msghdr */
memset
(
&
msg
,
0
,
sizeof
msg
);
# ifdef CMSG_SPACE
msg
.
msg_control
=
control_un
.
control
;
msg
.
msg_controllen
=
sizeof
(
control_un
.
control
);
# else
msg
.
msg_accrights
=
(
caddr_t
)
io
;
msg
.
msg_accrightslen
=
sizeof
(
io
);
# endif
msg
.
msg_name
=
NULL
;
msg
.
msg_namelen
=
0
;
msg
.
msg_iov
=
&
iov
;
msg
.
msg_iovlen
=
1
;
msg
.
msg_flags
=
0
;
switch
(
recvmsg
(
pair
[
p
][
1
],
&
msg
,
MSG_WAITALL
)
)
{
case
-
1
:
if
(
errno
==
EINTR
)
...
...
@@ -259,6 +266,12 @@ forkandexec(
char
control
[
CMSG_SPACE
(
sizeof
(
io
))];
}
control_un
;
struct
cmsghdr
*
cmptr
;
# endif
/* clear msghdr */
memset
(
&
msg
,
0
,
sizeof
msg
);
# ifdef CMSG_SPACE
msg
.
msg_control
=
control_un
.
control
;
msg
.
msg_controllen
=
sizeof
(
control_un
.
control
);
cmptr
=
CMSG_FIRSTHDR
(
&
msg
);
...
...
@@ -270,11 +283,12 @@ forkandexec(
msg
.
msg_accrights
=
(
caddr_t
)
io
;
msg
.
msg_accrightslen
=
sizeof
(
io
);
# endif
msg
.
msg_name
=
NULL
;
msg
.
msg_namelen
=
0
;
msg
.
msg_iov
=
&
iov
;
msg
.
msg_iovlen
=
1
;
msg
.
msg_flags
=
0
;
ldap_pvt_thread_mutex_lock
(
&
shell_surrogate_index_mutex
);
i
=
shell_surrogate_index
^=
1
;
ldap_pvt_thread_mutex_unlock
(
&
shell_surrogate_index_mutex
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment