<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
<br><br><div><div id="SkyDrivePlaceholder"></div>Date: Wed, 28 Nov 2012 15:10:17 +0100<br>From: jhrozek@redhat.com<br>To: sssd-devel@lists.fedorahosted.org<br>Subject: Re: [SSSD] [PATCH] when monitor_quit is call and the process not exists<br><br><pre>On Thu, Nov 22, 2012 at 12:48:25PM -0500, Ariel Barria wrote:<br>> <br>> <br>> <br>> > Date: Thu, 22 Nov 2012 15:42:59 +0100<br>> > From: jhrozek@redhat.com<br>> > To: sssd-devel@lists.fedorahosted.org<br>> > Subject: Re: [SSSD] [PATCH] when monitor_quit is call and the process not exists<br>> > <br>> > On Wed, Nov 21, 2012 at 03:15:43PM -0500, Ariel Barria wrote:<br>> > > <br>> > > Hi.<br>> > > well, I'm not sure that this patch have the behavior that is it hope. You have the word.<br>> > > But when monitor_quit is call and the process not exists, this remains in loop and not allow signal.<br>> > > I try it with Monitor Task and nothing. <br>> > > I had to reboot                                            <br>> > <br>> > Thanks a lot, Ariel, this is quite a bad bug. The concept is good, but<br>> > can you change the patch a little?<br>> > <br>> > instead of:<br>> > if (error != EINTR) {<br>> > kill()<br>> > if (error == ESRCH || error == ECHILD) {<br>> > killed = true;<br>> > }<br>> > }<br>> <br>> <br>> OK.<br>> <br>> > I would use:<br>> > if (error == ECHILD) {<br>> > /* Skip this process */<br>> > killed = true;<br>> > } else if (error != EINTR) {<br>> > /* Keep the block with the kill function around */<br>> > }<br>> > <br>> <br>> <br>> > Also, are you sure about the ESRCH error code? The waitpid man page only<br>> > mentions ECHILD..<br>> <br>> <br>> well, really not is waipit.<br>> For example 1<br>> (Thu Nov 22 10:17:44 2012) [sssd] [monitor_quit] (0x0040): Returned with: 1<br>> (Thu Nov 22 10:17:44 2012) [sssd] [monitor_quit] (0x0020): Terminating [pam][7494]<br>> (Thu Nov 22 10:17:44 2012) [sssd] [monitor_quit] (0x0020): Couldn't kill [pam][7494]: [3] [No such process] *********<br>> (Thu Nov 22 10:17:44 2012) [sssd] [monitor_quit] (0x0010): [10][No child processes] while waiting for [pam] ****waitpid<br>> (Thu Nov 22 10:17:44 2012) [sssd] [monitor_quit] (0x0020): Terminating [ssh][7493]<br>> (Thu Nov 22 10:17:44 2012) [sssd] [monitor_quit] (0x0020): Couldn't kill [ssh][7493]: [3] [No such process]<br>> (Thu Nov 22 10:17:44 2012) [sssd] [monitor_quit] (0x0010): [10][No child processes] while waiting for [ssh]<br>> (Thu Nov 22 10:17:44 2012) [sssd] [monitor_quit] (0x0020): Terminating [nss][7492]<br>> (Thu Nov 22 10:17:44 2012) [sssd] [monitor_quit] (0x0020): Couldn't kill [nss][7492]: [3] [No such process]<br>> (Thu Nov 22 10:17:44 2012) [sssd] [monitor_quit] (0x0010): [10][No child processes] while waiting for [nss]<br>> (Thu Nov 22 10:17:44 2012) [sssd] [sbus_remove_watch] (0x2000): 0x9ee5f0/0x9f1430<br>> <br>> I think that if the process not exists, is not necessary waitpit. you is agree?<br>> Based on this, the result would be:<br>> Example 2 <br>> Returned with: 1<br>> (Thu Nov 22 12:42:37 2012) [sssd] [monitor_quit] (0x0020): Terminating [nss][27350]<br>> (Thu Nov 22 12:42:37 2012) [sssd] [monitor_quit] (0x0020): Couldn't kill [nss][27350]: [No such process]<br>> (Thu Nov 22 12:42:37 2012) [sssd] [monitor_quit] (0x0020): Terminating [ssh][27349]<br>> (Thu Nov 22 12:42:37 2012) [sssd] [monitor_quit] (0x0020): Couldn't kill [ssh][27349]: [No such process]<br>> (Thu Nov 22 12:42:37 2012) [sssd] [monitor_quit] (0x0020): Terminating [pam][27348]<br>> (Thu Nov 22 12:42:37 2012) [sssd] [monitor_quit] (0x0020): Couldn't kill [pam][27348]: [No such process]<br>> (Thu Nov 22 12:42:37 2012) [sssd] [sbus_remove_watch] (0x2000): 0x237a080/0x237beb0<br>> <br>> <br>> otherwise (only ECHILD), the result would be how the first example.<br>> <br> <br>I don't think having that extra line really matters, it's just a DEBUG<br>message (and only in the case when the configuration is wrong anyway).<br> <br>What about the attached patch? It's the one you sent earlier with a<br>modification. Would you agree with that version? Would it fix the<br>problem for you?<br><br>Yes, this fix the problem :)<br>Thanks for comments and your time.<br></pre><br>_______________________________________________
sssd-devel mailing list
sssd-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/sssd-devel</div>                                            </div></body>
</html>