<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Calibri, sans-serif" size="2">
<div>Hi Richard,</div>
<div>&nbsp;</div>
<div>I want to implemented the cancel API for zypp backend. But have not found the proper way.</div>
<div>&nbsp;</div>
<div>I have reviewed the cancel method of other backends, and found it&#8217;s easy to call pk_backend_spawn_kill (spawn) if backend use PkBackendSpawn.</div>
<div>&nbsp;</div>
<div>But for the backend,&nbsp; which don&#8217;t use PkBackendSpawn,&nbsp; it&#8217;s complicated to implemented this transaction cancel method. Such as poldek, which call poldek&#8217;s sigint_emit () to cancel transaction and sigint_emit is implemented in poldek but not PackageKit.</div>
<div>&nbsp;</div>
<div>Most of the other backends just set the transaction status and do nothing.</div>
<div><font face="Times New Roman, serif">&nbsp;</font></div>
<div>I think, can PackageKit provide a function pk_backend_thread_cancel in pk-backend.c to send signal to the backend thread, the signal handler in thread can release some resources then call g_thread_exit to exit.</div>
<div>Then all the backend use thread can call pk_backend_thread_cancel to cancel transaction.</div>
<div>&nbsp;</div>
<div>Or any other method?</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>-Thanks</div>
<div>-Xiaoqiang</div>
<div><font face="Times New Roman, serif">&nbsp;</font></div>
<div><font face="Times New Roman, serif">&nbsp;</font></div>
</font>
</body>
</html>