Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
617052d6
Commit
617052d6
authored
Nov 15, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- exit() cannot return negative (or large) values
- waitpid() can fail
parent
7ce5b93a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
modules/misc/screensaver.c
modules/misc/screensaver.c
+4
-4
No files found.
modules/misc/screensaver.c
View file @
617052d6
...
...
@@ -139,11 +139,11 @@ static void Execute( intf_thread_t *p_this, const char *const *ppsz_args )
{
case
0
:
/* we're the child */
/* We don't want output */
f
close
(
stdout
);
f
close
(
stderr
);
f
reopen
(
"/dev/null"
,
"w"
,
stdout
);
f
reopen
(
"/dev/null"
,
"w"
stderr
);
execv
(
ppsz_args
[
0
]
,
(
char
*
const
*
)
ppsz_args
);
/* If the file we want to execute doesn't exist we exit() */
exit
(
-
1
);
exit
(
1
);
break
;
case
-
1
:
/* we're the error */
msg_Dbg
(
p_this
,
"Couldn't fork() while launching %s"
,
...
...
@@ -152,7 +152,7 @@ static void Execute( intf_thread_t *p_this, const char *const *ppsz_args )
default:
/* we're the parent */
/* Wait for the child to exit.
* We will not deadlock because we ran "/bin/sh &" */
w
aitpid
(
pid
,
NULL
,
0
);
w
hile
(
waitpid
(
pid
,
NULL
,
0
)
!=
pid
);
break
;
}
}
...
...
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