[Gambas-user] Trouble writing to Accepted Socket stream
Bruce
adamnt42 at gmail.com
Sat Mar 30 03:42:19 CET 2019
Have a look at http://gambaswiki.org/wiki/comp/gb.signal
From that, it looks like the IDE is catching a SIGTERM sent from the
telnet process (or the terminal emulator in which the telnet process is
running, your guess is as good as mine), which is not being handled in
your running "server" process. So the parent process (the IDE) is
terminating.
BTW, IMO the IDE should terminate given a SIGTERM! I can recall many
instances where I have needed to "kill" a runaway process running inside
the IDE. Mainly when I have got it into an endless loop that does not
invoke the event loop, so the only way to interrupt it is to kill the
parent process.
I reckon if you handle the SIGTERM (or whatever signal is being sent
from the telnet/terminal emulator session) using the gb.signal component
then you would be able to handle it as you desire.
b
On 30/3/19 12:27 pm, Cedron Dawg wrote:
> I'm not grieving, just perplexed.
>
> To be clear, I am running the TcpServer code in the IDE, connecting to it with Telnet. Sending a Ctrl-X from the telnet causes the IDE to immediately terminate and disappear. That seems like undesirable behavior to me. No popups, nothing, just gone. It disappears from the task bar at the bottom as well.
>
> I would think that the Gambas IDE should stay open, waiting for other connections.
>
>
> ----- Original Message -----
> From: "adamnt42" <adamnt42 at gmail.com>
> To: "user" <user at lists.gambas-basic.org>
> Sent: Friday, March 29, 2019 9:45:33 PM
> Subject: Re: [Gambas-user] Trouble writing to Accepted Socket stream
>
> I don't see why Ctrl+C is causing you so much grief? From Wikipedia:
> "In many command-line interface environments, control-C is used to abort
> the current task and regain user control. It is a special sequence which
> causes the operating system to send a signal to the active program.
> Usually the signal causes it to end, but the program may "catch" it and
> do something else, typically returning control to the user."
>
> and
>
> "In POSIX systems, the sequence causes the active program to receive
> SIGINT, the interruption signal. If the program does not specify how to
> handle this condition, it is terminated. Typically a program which does
> handle a SIGINT will still terminate itself, or at least terminate the
> task running inside it. "
>
>
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>
More information about the User
mailing list