unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [Shepherd] Should 'herd status' block for a long-running timer?
@ 2024-11-05 13:06 Felix Lechner via Development of GNU Guix and the GNU System distribution.
  2024-11-09 22:59 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Felix Lechner via Development of GNU Guix and the GNU System distribution. @ 2024-11-05 13:06 UTC (permalink / raw)
  To: guix-devel

Hi,

Are 'herd status' and 'herd status NAME' supposed to block on
long-running timers like this one?  [1]  Thanks!

Kind regards
Felix

[1] https://codeberg.org/lechner/system-config/src/commit/313b333d1e87477a3c1455e6a73485d9e348b7e2/host/wallace-server/operating-system.scm#L565-L665


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

* Re: [Shepherd] Should 'herd status' block for a long-running timer?
  2024-11-05 13:06 [Shepherd] Should 'herd status' block for a long-running timer? Felix Lechner via Development of GNU Guix and the GNU System distribution.
@ 2024-11-09 22:59 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2024-11-09 22:59 UTC (permalink / raw)
  To: Felix Lechner via Development of GNU Guix and the GNU System distribution.
  Cc: Felix Lechner

Hi,

Felix Lechner via "Development of GNU Guix and the GNU System
distribution." <guix-devel@gnu.org> skribis:

> Are 'herd status' and 'herd status NAME' supposed to block on
> long-running timers like this one?  [1]  Thanks!

In this case the timer is using a Scheme procedure, not a <command>
record.  Procedures must be written in a non-blocking/suspendable
fashion, as noted in the manual.

That said, I don’t immediately see what could block in your timer: it
uses ‘system*’ to spawn processes, which is suspendable inside shepherd.
Would be nice if you explain when it’s blocking and/or use ‘strace’ to
see what’s going on while it’s blocking.

That said, this timer is a bit long; I’d suggest going for something
simpler and/or deferring to a <command> that does the heavy lifting.

HTH,
Ludo’.


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

end of thread, other threads:[~2024-11-09 23:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-05 13:06 [Shepherd] Should 'herd status' block for a long-running timer? Felix Lechner via Development of GNU Guix and the GNU System distribution.
2024-11-09 22:59 ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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