Mercurial > sci
diff sciworkerd/sciworkerd.c @ 34:e52c762d8ba8
misc: cleanups
author | David Demelier <markand@malikania.fr> |
---|---|
date | Thu, 04 Aug 2022 17:47:19 +0200 |
parents | dae2de19ca5d |
children | 4076b07c7a6f |
line wrap: on
line diff
--- a/sciworkerd/sciworkerd.c Thu Aug 04 16:47:10 2022 +0200 +++ b/sciworkerd/sciworkerd.c Thu Aug 04 17:47:19 2022 +0200 @@ -1,3 +1,21 @@ +/* + * sciworkerd.c -- main sciworkerd file + * + * Copyright (c) 2021-2022 David Demelier <markand@malikania.fr> + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + #include <errno.h> #include <poll.h> #include <signal.h> @@ -375,8 +393,10 @@ LL_FOREACH_SAFE(taskpending, iter, tmp) taskentry_free(iter); - LL_FOREACH_SAFE(tasks, iter, tmp) + LL_FOREACH_SAFE(tasks, iter, tmp) { + task_kill(iter->task); taskentry_free(iter); + } LL_FOREACH_SAFE(taskfinished, iter, tmp) taskentry_free(iter); }