Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
128896a7
Commit
128896a7
authored
Oct 05, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reset signals for xdg-screensaver (fix #5414)
(cherry picked from commit 9468ddbd1c00447d1ea71e3b044b23201b9151e9)
parent
ca6fef11
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
modules/misc/inhibit/xdg.c
modules/misc/inhibit/xdg.c
+16
-1
No files found.
modules/misc/inhibit/xdg.c
View file @
128896a7
...
...
@@ -46,6 +46,7 @@ struct vlc_inhibit_sys
vlc_thread_t
thread
;
vlc_cond_t
update
,
inactive
;
vlc_mutex_t
lock
;
posix_spawnattr_t
attr
;
bool
suspend
,
suspended
;
};
...
...
@@ -65,6 +66,18 @@ static int Open (vlc_object_t *obj)
vlc_mutex_init
(
&
p_sys
->
lock
);
vlc_cond_init
(
&
p_sys
->
update
);
vlc_cond_init
(
&
p_sys
->
inactive
);
posix_spawnattr_init
(
&
p_sys
->
attr
);
/* Reset signal handlers to default and clear mask in the child process */
{
sigset_t
set
;
sigemptyset
(
&
set
);
posix_spawnattr_setsigmask
(
&
p_sys
->
attr
,
&
set
);
sigaddset
(
&
set
,
SIGPIPE
);
posix_spawnattr_setsigdefault
(
&
p_sys
->
attr
,
&
set
);
posix_spawnattr_setflags
(
&
p_sys
->
attr
,
POSIX_SPAWN_SETSIGDEF
|
POSIX_SPAWN_SETSIGMASK
);
}
p_sys
->
suspend
=
false
;
p_sys
->
suspended
=
false
;
...
...
@@ -92,6 +105,7 @@ static void Close (vlc_object_t *obj)
vlc_cancel
(
p_sys
->
thread
);
vlc_join
(
p_sys
->
thread
,
NULL
);
posix_spawnattr_destroy
(
&
p_sys
->
attr
);
vlc_cond_destroy
(
&
p_sys
->
inactive
);
vlc_cond_destroy
(
&
p_sys
->
update
);
vlc_mutex_destroy
(
&
p_sys
->
lock
);
...
...
@@ -137,7 +151,8 @@ static void *Thread (void *data)
pid_t
pid
;
vlc_mutex_unlock
(
&
p_sys
->
lock
);
if
(
!
posix_spawnp
(
&
pid
,
"xdg-screensaver"
,
NULL
,
NULL
,
argv
,
environ
))
if
(
!
posix_spawnp
(
&
pid
,
"xdg-screensaver"
,
NULL
,
&
p_sys
->
attr
,
argv
,
environ
))
{
int
status
;
...
...
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