Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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
wine
wine-winehq
Commits
96d6724e
Commit
96d6724e
authored
Jun 27, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libwine: Attempt to increase some user limits that are set too low on some platforms.
parent
f5f37a85
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
loader.c
libs/wine/loader.c
+24
-0
No files found.
libs/wine/loader.c
View file @
96d6724e
...
...
@@ -31,6 +31,9 @@
#ifdef HAVE_SYS_MMAN_H
#include <sys/mman.h>
#endif
#ifdef HAVE_SYS_RESOURCE_H
# include <sys/resource.h>
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
...
...
@@ -599,6 +602,23 @@ int wine_dll_get_owner( const char *name, char *buffer, int size, int *exists )
/***********************************************************************
* set_max_limit
*
* Set a user limit to the maximum allowed value.
*/
static
void
set_max_limit
(
int
limit
)
{
struct
rlimit
rlimit
;
if
(
!
getrlimit
(
limit
,
&
rlimit
))
{
rlimit
.
rlim_cur
=
rlimit
.
rlim_max
;
setrlimit
(
limit
,
&
rlimit
);
}
}
/***********************************************************************
* wine_init
*
* Main Wine initialisation.
...
...
@@ -610,6 +630,10 @@ void wine_init( int argc, char *argv[], char *error, int error_size )
void
*
ntdll
=
NULL
;
void
(
*
init_func
)(
void
);
/* force a few limits that are set too low on some platforms */
set_max_limit
(
RLIMIT_NOFILE
);
set_max_limit
(
RLIMIT_AS
);
wine_init_argv0_path
(
argv
[
0
]
);
build_dll_path
();
__wine_main_argc
=
argc
;
...
...
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