diff mbox

[8/9] Add end of test message

Message ID 54CC82B4-7CDC-41BC-8CD9-58C026A9EF15@gmail.com
State New
Headers show

Commit Message

Programmingkid April 25, 2017, 3:24 a.m. UTC
Print the message "End of test" on the risu host end.

Signed-off-by: John Arbuckle <programmingkidx@gmail.com>
---
  risu.c | 1 +
  1 file changed, 1 insertion(+)

           /* mismatch */

Comments

Peter Maydell April 25, 2017, 8:11 a.m. UTC | #1
On 25 April 2017 at 04:24, G 3 <programmingkidx@gmail.com> wrote:
> Print the message "End of test" on the risu host end.
>
> Signed-off-by: John Arbuckle <programmingkidx@gmail.com>
> ---
>  risu.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/risu.c b/risu.c
> index ed5b605..e7cbd57 100644
> --- a/risu.c
> +++ b/risu.c
> @@ -63,6 +63,7 @@ void apprentice_sigill(int sig, siginfo_t *si, void *uc)
>           return;
>        case 1:
>           /* end of test */
> +         printf("End of test\n");
>           exit(0);
>        default:
>           /* mismatch */

This code is a signal handler, you can't use printf() here.

thanks
-- PMM
diff mbox

Patch

diff --git a/risu.c b/risu.c
index ed5b605..e7cbd57 100644
--- a/risu.c
+++ b/risu.c
@@ -63,6 +63,7 @@  void apprentice_sigill(int sig, siginfo_t *si, void  
*uc)
           return;
        case 1:
           /* end of test */
+         printf("End of test\n");
           exit(0);
        default: