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
67bc4a6d
Commit
67bc4a6d
authored
May 19, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Don't use libwine during the Unix library initialization.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
fb310724
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
14 deletions
+21
-14
loader.c
dlls/ntdll/unix/loader.c
+21
-14
No files found.
dlls/ntdll/unix/loader.c
View file @
67bc4a6d
...
...
@@ -156,6 +156,17 @@ static void fatal_error( const char *err, ... )
exit
(
1
);
}
static
void
set_max_limit
(
int
limit
)
{
struct
rlimit
rlimit
;
if
(
!
getrlimit
(
limit
,
&
rlimit
))
{
rlimit
.
rlim_cur
=
rlimit
.
rlim_max
;
setrlimit
(
limit
,
&
rlimit
);
}
}
/* canonicalize path and return its directory name */
static
char
*
realpath_dirname
(
const
char
*
name
)
{
...
...
@@ -905,23 +916,11 @@ static void check_vmsplit( void *stack )
}
}
static
void
set_max_limit
(
int
limit
)
{
struct
rlimit
rlimit
;
if
(
!
getrlimit
(
limit
,
&
rlimit
))
{
rlimit
.
rlim_cur
=
rlimit
.
rlim_max
;
setrlimit
(
limit
,
&
rlimit
);
}
}
static
int
pre_exec
(
void
)
{
int
temp
;
check_vmsplit
(
&
temp
);
set_max_limit
(
RLIMIT_AS
);
#ifdef __i386__
return
1
;
/* we have a preloader on x86 */
#else
...
...
@@ -1004,7 +1003,6 @@ void __wine_main( int argc, char *argv[], char *envp[] )
{
HMODULE
module
;
wine_init_argv0_path
(
argv
[
0
]
);
init_paths
(
argc
,
argv
,
envp
);
if
(
!
getenv
(
"WINELOADERNOEXEC"
))
/* first time around */
...
...
@@ -1015,11 +1013,20 @@ void __wine_main( int argc, char *argv[], char *envp[] )
check_command_line
(
argc
,
argv
);
if
(
pre_exec
())
{
wine_exec_wine_binary
(
NULL
,
argv
,
getenv
(
"WINELOADER"
));
char
**
new_argv
=
malloc
(
(
argc
+
2
)
*
sizeof
(
*
argv
)
);
memcpy
(
new_argv
+
1
,
argv
,
(
argc
+
1
)
*
sizeof
(
*
argv
)
);
loader_exec
(
argv0
,
new_argv
,
is_win64
);
fatal_error
(
"could not exec the wine loader
\n
"
);
}
}
#ifdef RLIMIT_NOFILE
set_max_limit
(
RLIMIT_NOFILE
);
#endif
#ifdef RLIMIT_AS
set_max_limit
(
RLIMIT_AS
);
#endif
virtual_init
();
module
=
load_ntdll
();
...
...
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