Hi!
> -static void kill_children(int *child_pid)
> +static void kill_children(int *child_pid, int count)
> {
> int i;
>
> - for (i = 0; i < nb_cpu; i++)
> + for (i = 0; i < count; i++)
> kill(child_pid[i], SIGTERM);
> + free(child_pid);
> }
>
> int main(void)
> @@ -191,9 +192,7 @@ int main(void)
The int 'j' is now unused.
> child_pid[i] = fork();
> if (child_pid[i] == -1) {
> perror("An error occurs when calling fork()");
> - for (j = 0; j < i; j++)
> - kill(child_pid[j], SIGTERM);
> -
> + kill_children(child_pid, i)
^
Missing ';'
> return PTS_UNRESOLVED;
> } else if (child_pid[i] == 0) {
I've fixed these, tested that the testcase works and pushed both
patches, thanks.
--
Cyril Hrubis
[email protected]
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list