Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
44043a7d
Commit
44043a7d
authored
Jul 10, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Better handling of errors when accessing the /proc control files on Solaris.
parent
e5566691
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
2 deletions
+24
-2
procfs.c
server/procfs.c
+24
-2
No files found.
server/procfs.c
View file @
44043a7d
...
@@ -46,8 +46,22 @@ static int open_proc_as( struct process *process, int flags )
...
@@ -46,8 +46,22 @@ static int open_proc_as( struct process *process, int flags )
char
buffer
[
32
];
char
buffer
[
32
];
int
fd
;
int
fd
;
if
(
process
->
unix_pid
==
-
1
)
{
set_error
(
STATUS_ACCESS_DENIED
);
return
-
1
;
}
sprintf
(
buffer
,
"/proc/%u/as"
,
process
->
unix_pid
);
sprintf
(
buffer
,
"/proc/%u/as"
,
process
->
unix_pid
);
if
((
fd
=
open
(
buffer
,
flags
))
==
-
1
)
file_set_error
();
if
((
fd
=
open
(
buffer
,
flags
))
==
-
1
)
{
if
(
errno
==
ENOENT
)
/* probably got killed */
{
process
->
unix_pid
=
-
1
;
set_error
(
STATUS_ACCESS_DENIED
);
}
else
file_set_error
();
}
return
fd
;
return
fd
;
}
}
...
@@ -56,8 +70,16 @@ static int open_proc_lwpctl( struct thread *thread )
...
@@ -56,8 +70,16 @@ static int open_proc_lwpctl( struct thread *thread )
char
buffer
[
48
];
char
buffer
[
48
];
int
fd
;
int
fd
;
if
(
thread
->
unix_pid
==
-
1
)
return
-
1
;
sprintf
(
buffer
,
"/proc/%u/lwp/%u/lwpctl"
,
thread
->
unix_pid
,
thread
->
unix_tid
);
sprintf
(
buffer
,
"/proc/%u/lwp/%u/lwpctl"
,
thread
->
unix_pid
,
thread
->
unix_tid
);
if
((
fd
=
open
(
buffer
,
O_WRONLY
))
==
-
1
)
file_set_error
();
if
((
fd
=
open
(
buffer
,
O_WRONLY
))
==
-
1
)
{
if
(
errno
==
ENOENT
)
/* probably got killed */
thread
->
unix_pid
=
thread
->
unix_tid
=
-
1
;
else
file_set_error
();
}
return
fd
;
return
fd
;
}
}
...
...
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