Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 160929 Details for
Bug 251408
rdisc.c does not compile because OPEN_MAX not defined
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
use getrlimit instead of OPEN_MAX
iputils-s20070202-remove-OPEN_MAX.patch (text/plain), 719 bytes, created by
Sami Farin
on 2007-08-08 19:25:35 UTC
(
hide
)
Description:
use getrlimit instead of OPEN_MAX
Filename:
MIME Type:
Creator:
Sami Farin
Created:
2007-08-08 19:25:35 UTC
Size:
719 bytes
patch
obsolete
>--- iputils-s20070202/rdisc.c.bak 2007-02-02 14:55:46.000000000 +0200 >+++ iputils-s20070202/rdisc.c 2007-08-08 22:11:26.257662756 +0300 >@@ -32,8 +32,7 @@ > #include <stdlib.h> > #include <sys/types.h> > #include <sys/time.h> >-/* Do not use "improved" glibc version! */ >-#include <linux/limits.h> >+#include <sys/resource.h> > > #include <sys/param.h> > #include <sys/socket.h> >@@ -240,14 +239,19 @@ void do_fork(void) > { > int t; > pid_t pid; >- >+ struct rlimit rl; >+ rlim_t openmax = 1024; >+ > if (trace) > return; > > if ((pid=fork()) != 0) > exit(0); > >- for (t = 0; t < OPEN_MAX; t++) >+ if (getrlimit(RLIMIT_NOFILE, &rl) != -1) >+ openmax = rl.rlim_max; >+ >+ for (t = 0; t < openmax; t++) > if (t != s) > close(t); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 251408
: 160929