From 2aa1fffa8e1a7efe5ac9e5e792a0050f49f144a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Mon, 18 Nov 2019 21:43:49 +0100 Subject: [PATCH] plugins: python renderer: Add fork request to python renderer library, so it wont destory the base application --- .../external-renderer-interfaces.h | 5 +++ plugins/python-renderer/src/force-fork.c | 34 +++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 plugins/python-renderer/src/force-fork.c diff --git a/include/gds-render/output-renderers/external-renderer-interfaces.h b/include/gds-render/output-renderers/external-renderer-interfaces.h index 97cdc81..64a651c 100644 --- a/include/gds-render/output-renderers/external-renderer-interfaces.h +++ b/include/gds-render/output-renderers/external-renderer-interfaces.h @@ -55,6 +55,11 @@ */ #define FUNC_DECL(FUNC) FUNC +/** + * @brief Define for declaring exported variables + */ +#define VAR_DECL(VAR) VAR + /** @} */ #endif /* __EXTERNAL_RENDERER_INTERFACES_H__ */ diff --git a/plugins/python-renderer/src/force-fork.c b/plugins/python-renderer/src/force-fork.c new file mode 100644 index 0000000..60ffd8c --- /dev/null +++ b/plugins/python-renderer/src/force-fork.c @@ -0,0 +1,34 @@ +/* + * GDSII-Converter Python Plugin + * Copyright (C) 2019 Mario Hüttel + * + * This file is part of GDSII-Converter. + * + * GDSII-Converter is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * GDSII-Converter is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GDSII-Converter. If not, see . + */ + +/** + * @file python-renderer/force-fork.c + * @author Mario Hüttel + */ + +/** + * @addtogroup python-plugin + * @{ + */ + +#include + +const int VAR_DECL(EXTERNAL_LIBRARY_FORK_REQUEST) = 0; + +/** @} */