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
22aad637
Commit
22aad637
authored
May 27, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wmc: Clean output files when aborting on an error or signal.
parent
201f4695
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletion
+19
-1
wmc.c
tools/wmc/wmc.c
+19
-1
No files found.
tools/wmc/wmc.c
View file @
22aad637
...
...
@@ -116,6 +116,17 @@ time_t now; /* The time of start of wmc */
int
getopt
(
int
argc
,
char
*
const
*
argv
,
const
char
*
optstring
);
static
void
segvhandler
(
int
sig
);
static
void
cleanup_files
(
void
)
{
if
(
output_name
)
unlink
(
output_name
);
if
(
header_name
)
unlink
(
header_name
);
}
static
void
exit_on_signal
(
int
sig
)
{
exit
(
1
);
/* this will call the atexit functions */
}
int
main
(
int
argc
,
char
*
argv
[])
{
extern
char
*
optarg
;
...
...
@@ -126,7 +137,13 @@ int main(int argc,char *argv[])
int
i
;
int
cmdlen
;
atexit
(
cleanup_files
);
signal
(
SIGSEGV
,
segvhandler
);
signal
(
SIGTERM
,
exit_on_signal
);
signal
(
SIGINT
,
exit_on_signal
);
#ifdef SIGHUP
signal
(
SIGHUP
,
exit_on_signal
);
#endif
now
=
time
(
NULL
);
...
...
@@ -269,7 +286,8 @@ int main(int argc,char *argv[])
write_rc_file
(
output_name
);
if
(
!
rcinline
)
write_bin_files
();
output_name
=
NULL
;
header_name
=
NULL
;
return
0
;
}
...
...
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