Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!wieslauf.sub.de!.POSTED!reversiblemaps.ath.cx!not-for-mail From: Jasen Betts Newsgroups: comp.os.linux.development.apps Subject: Re: child process does not core dump ? Date: 28 Jul 2011 10:28:34 GMT Organization: Dis (not Dat) Organisation Lines: 27 Message-ID: References: <16ed5180-9f74-49d4-9d52-4af211f80ed9@d8g2000prf.googlegroups.com> NNTP-Posting-Host: +B8OggKW06da/+Txzg8H0A.user.wieslauf.sub.de Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@wieslauf.sub.de NNTP-Posting-Date: Thu, 28 Jul 2011 10:30:36 +0000 (UTC) User-Agent: slrn/pre1.0.0-18 (Linux) X-Notice: Filtered by postfilter v. 0.8.1 X-Face: ?)Aw4rXwN5u0~$nqKj`xPz>xHCwgi^q+^?Ri*+R(&uv2=E1Q0Zk(>h!~o2ID@6{uf8s;a +M[5[U[QT7xFN%^gR"=tuJw%TXXR'Fp~W;(T"1(739R%m0Yyyv*gkGoPA.$b,D.w:z+<'"=-lVT?6 {T?=R^:W5g|E2#EhjKCa+nt":4b}dU7GYB*HBxn&Td$@f%.kl^:7X8rQWd[NTc"P"u6nkisze/Q;8 "9Z{peQF,w)7UjV$c|RO/mQW/NMgWfr5*$-Z%u46"/00mx-,\R'fLPe.)^ Cancel-Lock: sha1:ViBvuc5YR+wmZ/mf+TMRoqVZ5/w= Xref: x330-a1.tempe.blueboxinc.net comp.os.linux.development.apps:225 On 2011-07-28, Srinivas Nayak wrote: > Hi, > > In my program, I fork() to get a child process. > Because of some problem, child process terminates by a segmentation > fault. > Parent process is still running. > > I have compiled my code with -g option. > I have done: ulimit -c unlimited. > > I am not getting core dump of the child process. > > How can I get the core dump of child process? Um. I think the current directory should be writable by the process user-id, there's probably several other ways to block a core dump too. you might have to emit some diagnostics (eg: to stderr) to help you find where the failure is. ( Another option is after forking, have the parent spawn a gdb instance attached to the child process (possibly spawn the gdb in an xterm if your stdio is busy already) then use that to trap the segfault. -- ⚂⚃ 100% natural