unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Zelphir Kaltstahl <zelphirkaltstahl@posteo.de>
To: Guile User <guile-user@gnu.org>
Subject: Web server catch keyboard interrupt and release port
Date: Tue, 15 Sep 2020 21:49:23 +0200	[thread overview]
Message-ID: <faeb976d-bc65-852c-9826-086cd377f7e5@posteo.de> (raw)

Hello Guile Users,

I am experimenting with Guile web server currently and would like to be
able to start and stop it in the REPL and Emacs Geiser REPL. I can
interrupt the (run-server ...) call using ctrl+c, but the bound port is
not released immediately. So I would like to catch the keyboard
interrupt and run code to release the port.

How can I catch the keyboard interrupt? Is there something in the Guile
manual? I could not find it.

(and how to stop the web server from running?)

Regards,
Zelphir

-- 
repositories: https://notabug.org/ZelphirKaltstahl




             reply	other threads:[~2020-09-15 19:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-15 19:49 Zelphir Kaltstahl [this message]
2020-09-15 21:02 ` Web server catch keyboard interrupt and release port Ricardo Wurmus
2020-09-16  6:42   ` Zelphir Kaltstahl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=faeb976d-bc65-852c-9826-086cd377f7e5@posteo.de \
    --to=zelphirkaltstahl@posteo.de \
    --cc=guile-user@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).