poke-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] poke: use pthread functions only if available


From: Hannes Domani
Subject: Re: [PATCH] poke: use pthread functions only if available
Date: Wed, 21 Feb 2024 15:37:29 +0000 (UTC)

 Am Mittwoch, 21. Februar 2024 um 16:30:41 MEZ hat Jose E. Marchesi 
<jemarch@gnu.org> Folgendes geschrieben:

> >  Am Mittwoch, 21. Februar 2024 um 11:47:54 MEZ hat Jose E. Marchesi 
> ><jemarch@gnu.org> Folgendes geschrieben:
> >
> >> Hi Hannes.
> >>
> >> Thanks for the patch.
> >>
> >> How does poke handle ctrl-C in the Windows terminal with this patch
> >> applied?  Does it get back to the (poke) prompt or kills the process?
> >
> > If you press ctrl-c when no poke command is currently executing, nothing
> > happens.
> > If you press ctrl-c while a poke command is processing, it immediately stops
> > and goes back to the (poke) prompt (apparently pvm_handle_signal does this).
>
> Yes, that covers when you press Ctrl-C while executing the PVM.  Like
> for example if you do:
>
>   (poke) while (1) {}
>   <Ctrl-c>
>
> On the other side, poke_sigint_handler is invoked when the PVM is not
> executing, i.e. when Poke code is not running.  Like in:
>
>   (poke) type this then press ctrl-c^C
>
>   (poke) _
>
>
> i.e. the signal handler removes the current text at the prompt and then
> draws a prompt again.  I expect your patch to impact this second case.

OK, so that's what this signal handling is for, you're right, this case
doesn't work, nothing at all happens if you press ctrl-c in the prompt.

I'll see if I can fix this.


Hannes


reply via email to

[Prev in Thread] Current Thread [Next in Thread]