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
ae8797c8
Commit
ae8797c8
authored
Jan 25, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools: Add a common helper to setup signal handlers.
parent
9f0ae8c9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
18 additions
and
49 deletions
+18
-49
make_xftmpl.c
tools/make_xftmpl.c
+1
-6
makedep.c
tools/makedep.c
+1
-6
sfnt2fon.c
tools/sfnt2fon/sfnt2fon.c
+1
-6
tools.h
tools/tools.h
+10
-0
widl.c
tools/widl/widl.c
+1
-6
main.c
tools/winebuild/main.c
+1
-7
winegcc.c
tools/winegcc/winegcc.c
+1
-6
wmc.c
tools/wmc/wmc.c
+1
-6
wrc.c
tools/wrc/wrc.c
+1
-6
No files found.
tools/make_xftmpl.c
View file @
ae8797c8
...
...
@@ -20,7 +20,6 @@
#include "config.h"
#include <signal.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
...
...
@@ -478,11 +477,7 @@ int main(int argc, char **argv)
}
else
{
output_file
=
option_outfile_name
;
atexit
(
cleanup_files
);
signal
(
SIGTERM
,
exit_on_signal
);
signal
(
SIGINT
,
exit_on_signal
);
#ifdef SIGHUP
signal
(
SIGHUP
,
exit_on_signal
);
#endif
init_signals
(
exit_on_signal
);
if
(
!
(
outfile
=
fopen
(
output_file
,
"wb"
)))
{
perror
(
option_outfile_name
);
goto
error
;
...
...
tools/makedep.c
View file @
ae8797c8
...
...
@@ -27,7 +27,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <signal.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
...
...
@@ -4395,11 +4394,7 @@ int main( int argc, char *argv[] )
if
(
argc
>
1
)
fatal_error
(
"Directory arguments not supported in this mode
\n
"
);
atexit
(
cleanup_files
);
signal
(
SIGTERM
,
exit_on_signal
);
signal
(
SIGINT
,
exit_on_signal
);
#ifdef SIGHUP
signal
(
SIGHUP
,
exit_on_signal
);
#endif
init_signals
(
exit_on_signal
);
for
(
i
=
0
;
i
<
HASH_SIZE
;
i
++
)
list_init
(
&
files
[
i
]
);
for
(
i
=
0
;
i
<
HASH_SIZE
;
i
++
)
list_init
(
&
global_includes
[
i
]
);
...
...
tools/sfnt2fon/sfnt2fon.c
View file @
ae8797c8
...
...
@@ -23,7 +23,6 @@
#include <assert.h>
#include <ctype.h>
#include <errno.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
...
...
@@ -912,11 +911,7 @@ int main(int argc, char **argv)
font_off
=
(
fontdir_off
+
fontdir_len
+
15
)
&
~
0x0f
;
atexit
(
cleanup
);
signal
(
SIGTERM
,
exit_on_signal
);
signal
(
SIGINT
,
exit_on_signal
);
#ifdef SIGHUP
signal
(
SIGHUP
,
exit_on_signal
);
#endif
init_signals
(
exit_on_signal
);
if
(
!
output_name
)
/* build a default output name */
output_name
=
strmake
(
"%s%s"
,
get_basename_noext
(
input_file
),
...
...
tools/tools.h
View file @
ae8797c8
...
...
@@ -401,6 +401,16 @@ static inline void remove_temp_files(void)
}
static
inline
void
init_signals
(
void
(
*
cleanup
)(
int
)
)
{
signal
(
SIGTERM
,
cleanup
);
signal
(
SIGINT
,
cleanup
);
#ifdef SIGHUP
signal
(
SIGHUP
,
cleanup
);
#endif
}
static
inline
void
*
read_file
(
const
char
*
name
,
size_t
*
size
)
{
struct
stat
st
;
...
...
tools/widl/widl.c
View file @
ae8797c8
...
...
@@ -28,7 +28,6 @@
#include <string.h>
#include <assert.h>
#include <ctype.h>
#include <signal.h>
#include <limits.h>
#include <sys/types.h>
...
...
@@ -704,11 +703,7 @@ int main(int argc,char *argv[])
struct
strarray
files
;
char
*
input
;
signal
(
SIGTERM
,
exit_on_signal
);
signal
(
SIGINT
,
exit_on_signal
);
#ifdef SIGHUP
signal
(
SIGHUP
,
exit_on_signal
);
#endif
init_signals
(
exit_on_signal
);
init_argv0_dir
(
argv
[
0
]
);
target
=
init_argv0_target
(
argv
[
0
]
);
...
...
tools/winebuild/main.c
View file @
ae8797c8
...
...
@@ -26,7 +26,6 @@
#include <assert.h>
#include <stdio.h>
#include <signal.h>
#include <errno.h>
#include <string.h>
#include <stdarg.h>
...
...
@@ -619,12 +618,7 @@ int main(int argc, char **argv)
struct
strarray
files
;
DLLSPEC
*
spec
=
main_spec
=
alloc_dll_spec
();
#ifdef SIGHUP
signal
(
SIGHUP
,
exit_on_signal
);
#endif
signal
(
SIGTERM
,
exit_on_signal
);
signal
(
SIGINT
,
exit_on_signal
);
init_signals
(
exit_on_signal
);
target
=
init_argv0_target
(
argv
[
0
]
);
if
(
target
.
platform
==
PLATFORM_CYGWIN
)
target
.
platform
=
PLATFORM_MINGW
;
if
(
is_pe
())
unwind_tables
=
1
;
...
...
tools/winegcc/winegcc.c
View file @
ae8797c8
...
...
@@ -91,7 +91,6 @@
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <stdarg.h>
#include <string.h>
#include <errno.h>
...
...
@@ -1488,11 +1487,7 @@ int main(int argc, char **argv)
char
*
lang
=
0
;
char
*
str
;
#ifdef SIGHUP
signal
(
SIGHUP
,
exit_on_signal
);
#endif
signal
(
SIGTERM
,
exit_on_signal
);
signal
(
SIGINT
,
exit_on_signal
);
init_signals
(
exit_on_signal
);
init_argv0_dir
(
argv
[
0
]
);
/* setup tmp file removal at exit */
...
...
tools/wmc/wmc.c
View file @
ae8797c8
...
...
@@ -23,7 +23,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <limits.h>
#include <sys/types.h>
...
...
@@ -221,11 +220,7 @@ int main(int argc,char *argv[])
struct
strarray
files
;
atexit
(
cleanup_files
);
signal
(
SIGTERM
,
exit_on_signal
);
signal
(
SIGINT
,
exit_on_signal
);
#ifdef SIGHUP
signal
(
SIGHUP
,
exit_on_signal
);
#endif
init_signals
(
exit_on_signal
);
init_argv0_dir
(
argv
[
0
]
);
/* First rebuild the commandline to put in destination */
...
...
tools/wrc/wrc.c
View file @
ae8797c8
...
...
@@ -26,7 +26,6 @@
#include <string.h>
#include <assert.h>
#include <ctype.h>
#include <signal.h>
#include <limits.h>
#include <sys/types.h>
...
...
@@ -396,11 +395,7 @@ int main(int argc,char *argv[])
{
int
i
;
signal
(
SIGTERM
,
exit_on_signal
);
signal
(
SIGINT
,
exit_on_signal
);
#ifdef SIGHUP
signal
(
SIGHUP
,
exit_on_signal
);
#endif
init_signals
(
exit_on_signal
);
init_argv0_dir
(
argv
[
0
]
);
/* Set the default defined stuff */
...
...
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