lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 27 Aug 2009 19:17:25 +0900
From:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Cc:	Oleg Nesterov <oleg@...hat.com>, akpm@...ux-foundation.org,
	linux-kernel@...r.kernel.org
Subject: Re: mmotm 2009-08-24-16-24 uploaded

On Thu, 27 Aug 2009 18:43:03 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com> wrote:
> Can't get it. It seems reaped.
> ==
> [root@...extal mmotm-2.6.31-Aug27]# kill -s 0 2990(CHILD's pid)
> bash: kill: (2990) - No such process
> 

I think I found something. rpc.statd did...

==
[pid  3372] rt_sigaction(SIGCHLD, {0x1, [CHLD], SA_RESTORER|SA_RESTART, 0x7f688fb52f90}, {SIG_DFL, [], 0}, 8) = 0
[pid  3372] rt_sigaction(SIGPIPE, {0x1, [PIPE], SA_RESTORER|SA_RESTART, 0x7f688fb52f90}, {SIG_DFL, [], 0}, 8) = 0
[pid  3372] unlink("/var/run/rpc.statd.pid") = 0
.....
[pid  3372] clone(Process 3373 attached
child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f68902a0780) = 3373
[pid  3372] wait4(3373, Process 3372 suspended
 <unfinished ...>
==

Then, SIG_IGN is set to SIGCHLD handler and children's p->exit_signal == -1.

In old bahaivor, parent, who calls wait, was waken up even if SIG_IGN.
Now, filtered, not wake up.

>From man.
==
 POSIX.1-2001  specifies  that  if the disposition of SIGCHLD is set to SIG_IGN or the SA_NOCLDWAIT
       flag is set for SIGCHLD (see sigaction(2)), then children that terminate do not become zombies and
       a  call  to  wait() or waitpid() will block until all children have terminated, and then fail with
       errno set to ECHILD.  (The original POSIX standard left the behavior of setting SIGCHLD to SIG_IGN
       unspecified.   Note  that  even  though the default disposition of SIGCHLD is "ignore", explicitly
       setting the disposition to SIG_IGN results in different treatment  of  zombie  process  children.)
==
I can't undestand what happens to a parent process which does
	1. set SIG_CHLD to SIG_IGN
	2. call waitpid()
	3. all children goes away.



Thanks,
-Kame

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ