Skip to content

Commit 53b1a62

Browse files
committed
Getting rid of a warning produced by jsig library on JDK 16+.
1 parent dd0275e commit 53b1a62

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

graal-nodejs/deps/uv/src/unix/process.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,9 @@ static void uv__process_child_init(const uv_process_options_t* options,
228228
* are enabled. We are not allowed to touch RT signal handlers, glibc uses
229229
* them internally.
230230
*/
231+
struct sigaction sa;
232+
memset(&sa, 0, sizeof(sa));
233+
sa.sa_handler = SIG_DFL;
231234
for (n = 1; n < 32; n += 1) {
232235
if (n == SIGKILL || n == SIGSTOP)
233236
continue; /* Can't be changed. */
@@ -237,7 +240,7 @@ static void uv__process_child_init(const uv_process_options_t* options,
237240
continue; /* Can't be changed. */
238241
#endif
239242

240-
if (SIG_ERR != signal(n, SIG_DFL))
243+
if (0 == sigaction(n, &sa, NULL))
241244
continue;
242245

243246
uv__write_errno(error_fd);

0 commit comments

Comments
 (0)