Mailinglist Archive: opensuse-bugs (5249 mails)

< Previous Next >
[Bug 442475] [yast2-ntp-client] Cancel button ineffective while starting the module.
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Wed, 1 Apr 2009 01:26:19 -0600 (MDT)
  • Message-id: <20090401072619.5595ACC7D0@xxxxxxxxxxxxxxxxxxxxxx>
https://bugzilla.novell.com/show_bug.cgi?id=442475

User jsmeix@xxxxxxxxxx added comment
https://bugzilla.novell.com/show_bug.cgi?id=442475#c14


Johannes Meixner <jsmeix@xxxxxxxxxx> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |jsmeix@xxxxxxxxxx




--- Comment #14 from Johannes Meixner <jsmeix@xxxxxxxxxx> 2009-04-01 01:26:16
MDT ---
Only FYI what could help regarding comment #9:
"not be easy to solve ... code ... does not run in parallel to the UI"

The solution is to run code in parallel to the UI.

When I have to do something in the system
where I don't know if it will finish,
I call a bash script from YaST.
The reason is that at least for me it is easiest
via a bash script to work with several processes
so that a background process does the actual work
while the foreground process controls the worker-process.
After a timeout the foreground watchdog kills the worker.

See for example in the YaST printer and scanner modules
the bash scripts in /usr/lib/YaST2/bin/ which contain
a "MAXIMUM_WAIT" like
----------------------------------------------------------
#! /bin/bash
export PATH="/sbin:/usr/sbin:/usr/bin:/bin"
export LC_ALL="POSIX"
export LANG="POSIX"
umask 022
MAXIMUM_WAIT="10"
/run/the/worker/command &
PID=$!
for i in $( seq $MAXIMUM_WAIT )
do ps $PID &>/dev/null || break
sleep 1
done
if ps $PID &>/dev/null
then kill -9 $PID &>/dev/null
exit 1
fi
exit 0
----------------------------------------------------------

This way there is no longer an unlimited waiting
which mitigates the "Cancel button ineffective" issue
but clicking [Cancel] is still ignored (compare bug #489077)
until the timeout had happened and then
https://bugzilla.novell.com/show_bug.cgi?id=442173#c4
might happen.

--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

< Previous Next >
This Thread
  • No further messages