unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#70144: system* affects signal handlers
@ 2024-04-02 14:22 Christopher Baines
  2024-04-03  8:28 ` Mikael Djurfeldt
  0 siblings, 1 reply; 5+ messages in thread
From: Christopher Baines @ 2024-04-02 14:22 UTC (permalink / raw)
  To: 70144

[-- Attachment #1: Type: text/plain, Size: 544 bytes --]

I've encountered a situation where signal handlers don't seem to
run. With the following program, sending it SIGINT won't trigger the
handler, however if you remove the system* call, then the handler will
run.

  (use-modules (ice-9 threads))

  (call-with-new-thread
   (lambda ()
     ;; Remove the following system* call to fix the handler
     (system* "echo" "foo")))

  (sigaction SIGINT
    (lambda (sig)
      (peek "SIGINT handler")
      (exit 1)))

  (for-each
   (lambda _
     (sleep 1))
   (iota 30))

  (display "normal exit\n")

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-05-06 10:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-02 14:22 bug#70144: system* affects signal handlers Christopher Baines
2024-04-03  8:28 ` Mikael Djurfeldt
2024-05-02 14:17   ` Ludovic Courtès
2024-05-05 16:41     ` Josselin Poiret via Bug reports for GUILE, GNU's Ubiquitous Extension Language
2024-05-06 10:00       ` Ludovic Courtès

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).