Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Per Cederqvist
lyskom-server-ceder-1616-generations-topgit
Commits
282238dd
Commit
282238dd
authored
Apr 17, 1999
by
Per Cederqvist
Browse files
(isc_relocate_fd): Implemented for real.
parent
d69e73af
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/libraries/libisc-new/src/isc_relocate.c
View file @
282238dd
...
...
@@ -10,6 +10,8 @@
#endif
#include
<sys/types.h>
#include
<sys/socket.h>
#include
<fcntl.h>
#include
<unistd.h>
#include
"isc.h"
...
...
@@ -19,9 +21,15 @@ int
isc_relocate_fd
(
int
fd
,
int
limit
)
{
if
(
limit
==
0
)
int
high_fd
;
if
(
limit
<=
0
)
return
fd
;
high_fd
=
fcntl
(
fd
,
F_DUPFD
,
limit
);
if
(
high_fd
<
0
)
return
fd
;
/* FIXME: magic ioctl here */
return
fd
;
close
(
fd
);
return
high_
fd
;
}
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