help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Fun with async processes


From: Emanuel Berg
Subject: Re: Fun with async processes
Date: Mon, 31 Jan 2022 18:11:44 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

tomas wrote:

> An obvious approach is to have each sentinel call a "global"
> sentinel which checks whether there are any processes still
> running (akin to your myrun, only that it just gets called
> after each process's termination).

Won't that move the "busy wait" to the global sentinel?

Send signals? Yeah, heavy-handed ...

;;; -*- lexical-binding: t -*-
;;;
;;; this file:
;;;   http://user.it.uu.se/~embe8573/emacs-init/signal.el
;;;   https://dataswamp.org/~incal/emacs-init/signal.el
;;;
;;; test from Emacs:
;;;   (signal-process (emacs-pid) 'sigusr1)
;;;
;;; test from zsh:
;;;   $ kill -s usr1 $(pidof emacs)

(defun signal-usr1-f ()
  (interactive)
  (message "USR1 signal") )

(define-key special-event-map [sigusr1] #'signal-usr1-f)

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

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