[SLOF] [PATCH] paflof: Print stack warning to stderr, not stdout
Alexey Kardashevskiy
aik at ozlabs.ru
Thu Jun 15 16:13:21 AEST 2017
On 08/06/17 22:23, Thomas Huth wrote:
> Now that stdout is routed through the TYPE Forth word, we should
> avoid using stdout in critical sections in the engine() function.
> So print the stack warning via stderr now instead.
>
Thanks, applied.
> Signed-off-by: Thomas Huth <thuth at redhat.com>
> ---
> slof/paflof.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/slof/paflof.c b/slof/paflof.c
> index 5c4f4e1..50b4adf 100644
> --- a/slof/paflof.c
> +++ b/slof/paflof.c
> @@ -90,7 +90,7 @@ long engine(int mode, long param_1, long param_2)
> }
>
> if ((char *)&ip < the_system_stack && !did_stackwarning) {
> - puts("ERROR: stack overflow in engine()!");
> + fprintf(stderr, "\nERROR: stack overflow in engine()!\n");
> did_stackwarning = 1;
> }
>
>
--
Alexey
More information about the SLOF
mailing list