[Top][All Lists]

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

Re: RFC: subcommand to pause/resume builds

From: Bengt Richter
Subject: Re: RFC: subcommand to pause/resume builds
Date: Wed, 4 Nov 2020 11:28:14 +0100
User-agent: Mutt/1.10.1 (2018-07-13)

Hi all,

On +2020-11-03 14:53:07 +0100, Ludovic Courtès wrote:
> Hi,
> John Soo <> skribis:
> > I was looking to pause a long build today and asked on IRC how to
> > accomplish pause/resume.  It seems this is possible already with the
> > following:
> >
> > kill --signal SIGSTOP|SIGCONT {pids-of-build-process-tree}
> >
> > There is already a command to list the processes associated to guix
> > commands: guix processes.  Perhaps pause/resume can be a subcommand or
> > set of flags to guix processes. The following is the first thing that
> > comes to mind:
> >
> > guix processes --pause package-name ... --resume package-name ...
> >
> > What do you think?
> First, note that the daemon is unaware of “packages”, it only knows
> about “derivations”.

What if you turned the problem inside out, and made the derivation
volunteer to be paused (at sensible places in its progress)?

I.e., if you defined part of a given derivation 
to do a check for the existence of

    (.sfx appended to signify special effects :) 

ISTM that could open the door for some easy hacks, (and probably some dangers 
to watch for :)
E.g. a proof of concept might be just to sleep 6 seconds (say) and repeat 
until the file disappears.

IWG this should not change anything for non-volunteering derivations other than 
the load-relief
of not running the sleeping process(es).

Then the person wanting to pause the derivation 
could do so simply by
and deleting it when wanting to allow it to continue.

Later, if that works, .sfx files could have content, for as yet unimagined 
purposes ;)

> Conclusion: I don’t think we can implement this reliably.

IDK from the outside, but inside-out, WDYT?

> HTH!
> Ludo’.

Bengt Richter

reply via email to

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