How to make confmodules abort? (was Re: Bug#214935: cdebconf-newt-udeb: OK button misleading...)
- To: debian-boot@lists.debian.org
- Subject: How to make confmodules abort? (was Re: Bug#214935: cdebconf-newt-udeb: OK button misleading...)
- From: barbier@linuxfr.org (Denis Barbier)
- Date: Tue, 9 Dec 2003 00:09:36 +0100
- Message-id: <[🔎] 20031208230936.GA10104@zobe.linuxfr.org>
- In-reply-to: <20031122214511.GA7578@kitenet.net>
- References: <20031009145801.16340.qmail@mx.mmweg.rwth-aachen.de> <20031122152527.GB2409@zobe.linuxfr.org> <20031122172941.GA3389@kitenet.net> <20031122213547.GA21233@zobe.linuxfr.org> <20031122214511.GA7578@kitenet.net>
[I discussed privately with Joey Hess while the BTS was down, and am now
switching back to debian-boot. I wrote some code to add an Abort
button, its purpose being to return to main-menu, e.g. when a progress
bar is displayed and user does not want to wait anymore]
On Sat, Nov 22, 2003 at 04:45:11PM -0500, Joey Hess wrote:
[...]
> > > This gets me wondering why we need to distinguish between back and abort
> > > at the debconf protocol level, but I suppose the problem is that the
> > > only way for a progress bar to abort is to kill the confmodule program?
> >
> > Yes.
>
> BTW, how do you know what the confmodule program is when main-menu has
> execed something else? I don't see how cdebconf could tell in this case
> that a config script is the thing to kill, and not main-menu.
I see only 2 options:
a. Either kill main-menu and restart everything
b. Or only kill the config script.
Of course (b) must be implemented. Config scripts can register their
PID, e.g. by adding
db_set debconf/confmodule_pid $$
in src/client/confmodule, which will automatically set
debconf/confmodule_pid to the right PID when config scripts are shell
scripts. Similarly the debconfclient_new function in src/debconfclient.c
can also set debconf/confmodule_pid to the current PID.
IMO having a single value is enough, there is no need to keep PID on
a stack. Comments?
Denis
Reply to: