Mailinglist Archive: yast-commit (535 mails)

< Previous Next >
[yast-commit] r41535 - in /trunk/fingerprint-reader: VERSION agent-thinkfinger/src/ThinkFingerAgent.cc package/yast2-fingerprint-reader.changes src/users_plugin_fingerprint_reader.ycp
  • From: jsuchome@xxxxxxxxxxxxxxxx
  • Date: Wed, 24 Oct 2007 08:06:33 -0000
  • Message-id: <20071024080633.9BF432D18E@xxxxxxxxxxxxxxxx>
Author: jsuchome
Date: Wed Oct 24 10:06:33 2007
New Revision: 41535

URL: http://svn.opensuse.org/viewcvs/yast?rev=41535&view=rev
Log:
- Cancel button: send the child process SIGKILL when it is still
alive 3 seconds after SIGTERM
- 2.16.1


Modified:
trunk/fingerprint-reader/VERSION
trunk/fingerprint-reader/agent-thinkfinger/src/ThinkFingerAgent.cc
trunk/fingerprint-reader/package/yast2-fingerprint-reader.changes
trunk/fingerprint-reader/src/users_plugin_fingerprint_reader.ycp

Modified: trunk/fingerprint-reader/VERSION
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/fingerprint-reader/VERSION?rev=41535&r1=41534&r2=41535&view=diff
==============================================================================
--- trunk/fingerprint-reader/VERSION (original)
+++ trunk/fingerprint-reader/VERSION Wed Oct 24 10:06:33 2007
@@ -1 +1 @@
-2.16.0
+2.16.1

Modified: trunk/fingerprint-reader/agent-thinkfinger/src/ThinkFingerAgent.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/fingerprint-reader/agent-thinkfinger/src/ThinkFingerAgent.cc?rev=41535&r1=41534&r2=41535&view=diff
==============================================================================
--- trunk/fingerprint-reader/agent-thinkfinger/src/ThinkFingerAgent.cc
(original)
+++ trunk/fingerprint-reader/agent-thinkfinger/src/ThinkFingerAgent.cc Wed Oct
24 10:06:33 2007
@@ -182,19 +182,15 @@
}
// wait for child exit
else if (PC(0) == "exit_status" ) {
-y2internal ("waiting for child exit...");
int status;
int retval = 255;
-//FIXME in case of
-//Warning: usb_bulk_read expected to read 0x40 (read 0x34 bytes).
-//child doesn't exit...
wait (&status);
if (WIFSIGNALED (status))
y2milestone ("child process was killed");
else if (WIFEXITED (status))
{
retval = WEXITSTATUS (status);
-y2milestone ("retval is %d", retval);
+ y2milestone ("retval is %d", retval);
}
ret = YCPInteger (retval);
close (data_pipe[0]); // close FD for reading
@@ -230,10 +226,25 @@
if (path->length() == 1) {

if (PC(0) == "cancel") {
-y2internal ("killing child process with pid %d", child_pid);
+ y2milestone ("terminanting child process with pid %d", child_pid);
if (child_pid)
- kill (child_pid, 15);
- child_pid = -1;
+ {
+ if (kill (child_pid, 15) != -1)
+ {
+ sleep (3);
+ int status;
+ if (waitpid (-1, &status, WNOHANG) == 0)
+ {
+ y2milestone ("... still alive, killing it", child_pid);
+ kill (child_pid, 9);
+ }
+ child_pid = -1;
+ }
+ else
+ {
+ y2error ("error while killing: %d (%m)", errno);
+ }
+ }
ret = YCPBoolean (true);
}
/**

Modified: trunk/fingerprint-reader/package/yast2-fingerprint-reader.changes
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/fingerprint-reader/package/yast2-fingerprint-reader.changes?rev=41535&r1=41534&r2=41535&view=diff
==============================================================================
--- trunk/fingerprint-reader/package/yast2-fingerprint-reader.changes (original)
+++ trunk/fingerprint-reader/package/yast2-fingerprint-reader.changes Wed Oct
24 10:06:33 2007
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Wed Oct 24 09:55:20 CEST 2007 - jsuchome@xxxxxxx
+
+- Cancel button: send the child process SIGKILL when it is still
+ alive 3 seconds after SIGTERM
+- 2.16.1
+
+-------------------------------------------------------------------
Mon Oct 22 10:18:32 CEST 2007 - jsuchome@xxxxxxx

- fixed wrong widget id (#333670)

Modified: trunk/fingerprint-reader/src/users_plugin_fingerprint_reader.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/fingerprint-reader/src/users_plugin_fingerprint_reader.ycp?rev=41535&r1=41534&r2=41535&view=diff
==============================================================================
--- trunk/fingerprint-reader/src/users_plugin_fingerprint_reader.ycp (original)
+++ trunk/fingerprint-reader/src/users_plugin_fingerprint_reader.ycp Wed Oct 24
10:06:33 2007
@@ -156,7 +156,6 @@
}
else if (statemap == nil)
{
-y2internal ("statemap is nil - error?");
exit_status = (integer) SCR::Read (.thinkfinger.exit_status);
break;
}
@@ -171,7 +170,7 @@
if (ui == `cancel || ui == `back)
{
SCR::Execute (.thinkfinger.cancel);
- y2internal ("exit status after cancel: %1", SCR::Read
(.thinkfinger.exit_status));
+ y2milestone ("exit status after cancel: %1", SCR::Read
(.thinkfinger.exit_status));
break;
}
sleep (100);

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages