Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sergi
Tor
Commits
e6e929f5
Commit
e6e929f5
authored
12 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'public/bug8209'
parents
73182e32
da6720e9
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changes/bug8209
+6
-0
6 additions, 0 deletions
changes/bug8209
src/common/util.c
+3
-2
3 additions, 2 deletions
src/common/util.c
with
9 additions
and
2 deletions
changes/bug8209
0 → 100644
+
6
−
0
View file @
e6e929f5
o Minor bugfixes:
- When detecting the largest possible file descriptor (in order to close
all file descriptors when launching a new program), actually use
_SC_OPEN_MAX. The old code for doing this was very, very broken.
Fix for bug 8209; bugfix on 0.2.3.1-alpha. Found by Coverity; this
is CID 743383.
This diff is collapsed.
Click to expand it.
src/common/util.c
+
3
−
2
View file @
e6e929f5
...
...
@@ -3834,12 +3834,13 @@ tor_spawn_background(const char *const filename, const char **argv,
child_state
=
CHILD_STATE_MAXFD
;
#ifdef _SC_OPEN_MAX
if
(
-
1
!
=
max_fd
)
{
if
(
-
1
=
=
max_fd
)
{
max_fd
=
(
int
)
sysconf
(
_SC_OPEN_MAX
);
if
(
max_fd
==
-
1
)
if
(
max_fd
==
-
1
)
{
max_fd
=
DEFAULT_MAX_FD
;
log_warn
(
LD_GENERAL
,
"Cannot find maximum file descriptor, assuming %d"
,
max_fd
);
}
}
#else
max_fd
=
DEFAULT_MAX_FD
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment