Skip to content

Commit 1251029

Browse files
committed
Merge branch 'eyraud/fix_wait_for_processes' into 'master'
Fixes in GNATCOLL.OS.Process.Wait_For_Processes Closes #45 See merge request eng/toolchain/gnatcoll-core!91
2 parents d20e909 + 2d68d3d commit 1251029

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/os/unix/process-wrappers.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ int __gnatcoll_wait_for_sigchld (int fd, sint_64 timeout)
104104
}
105105

106106
while (tv.tv_sec > 0 || tv.tv_usec > 0) {
107-
retval = select(fd + 1, &fd_list, NULL, NULL, &tv);
107+
retval = select(fd + 1, &fd_list, NULL, NULL, effective_timeout);
108108
if (retval > 0)
109109
{
110110
read (fd, buf, 1);
@@ -129,7 +129,7 @@ int __gnatcoll_init_sigchld_monitoring()
129129
struct sigaction action;
130130
action.sa_handler = __gnatcoll_write_on_sigchld;
131131
sigemptyset(&action.sa_mask);
132-
action.sa_flags = 0;
132+
action.sa_flags = SA_RESTART;
133133
return sigaction (SIGCHLD, &action, NULL);
134134
}
135135

0 commit comments

Comments
 (0)