Skip to content

Commit 83bb843

Browse files
committed
Ignore SIGCHLD on posix
This prevents the creation of zombie children
1 parent e1bd32d commit 83bb843

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

gframe/gframe.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,14 @@ int _tmain(int argc, epro::path_char* argv[]) {
190190
return EXIT_FAILURE;
191191
}
192192
show_changelog = args[LAUNCH_PARAM::CHANGELOG].enabled;
193-
#if !EDOPRO_WINDOWS
193+
#if EDOPRO_POSIX
194194
setlocale(LC_CTYPE, "UTF-8");
195-
#endif //EDOPRO_WINDOWS
195+
struct sigaction sa;
196+
sa.sa_handler = SIG_IGN;
197+
sigemptyset(&sa.sa_mask);
198+
sa.sa_flags = 0;
199+
(void)sigaction(SIGCHLD, &sa, 0);
200+
#endif //EDOPRO_POSIX
196201
ygo::ClientUpdater updater(args[LAUNCH_PARAM::OVERRIDE_UPDATE_URL].argument);
197202
ygo::gClientUpdater = &updater;
198203
std::unique_ptr<ygo::DataHandler> data{ nullptr };

0 commit comments

Comments
 (0)