Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
5c6765ea
Commit
5c6765ea
authored
Jun 20, 2004
by
Warren Dukes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use getdtablesize() to get the max number of fd's
git-svn-id:
https://svn.musicpd.org/mpd/trunk@1579
09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent
9db4044f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
10 deletions
+2
-10
main.c
src/main.c
+2
-10
No files found.
src/main.c
View file @
5c6765ea
...
...
@@ -205,17 +205,9 @@ void parseOptions(int argc, char ** argv, Options * options) {
void
closeAllFDs
()
{
int
i
;
int
fds
=
getdtablesize
();
for
(
i
=
0
;
i
<
FD_SETSIZE
;
i
++
)
{
switch
(
i
)
{
case
STDIN_FILENO
:
case
STDOUT_FILENO
:
case
STDERR_FILENO
:
break
;
default:
close
(
i
);
}
}
for
(
i
=
3
;
i
<
fds
;
i
++
)
close
(
i
);
}
void
establishListen
(
Options
*
options
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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