Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming > #2348 > unrolled thread

parent exits before child process

Started byhny <honey9329@hotmail.com>
First post2012-10-15 15:01 -0500
Last post2012-10-22 10:23 -0700
Articles 3 — 3 participants

Back to article view | Back to comp.programming


Contents

  parent exits before child process hny <honey9329@hotmail.com> - 2012-10-15 15:01 -0500
    Re: parent exits before child process Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-10-15 16:44 -0700
    Re: parent exits before child process bob <bob@coolfone.comze.com> - 2012-10-22 10:23 -0700

#2348 — parent exits before child process

Fromhny <honey9329@hotmail.com>
Date2012-10-15 15:01 -0500
Subjectparent exits before child process
Message-ID<5cadneA_Lo4f9uHNnZ2dnUVZ_qCdnZ2d@giganews.com>
anyone help write c code create a child process that finds the parent and child PIDs and parent exits before child


[toc] | [next] | [standalone]


#2351

FromDaniel Pitts <newsgroup.nospam@virtualinfinity.net>
Date2012-10-15 16:44 -0700
Message-ID<Id1fs.3381$yg5.1990@newsfe12.iad>
In reply to#2348
On 10/15/12 1:01 PM, hny wrote:
> anyone help write c code create a child process that finds the parent and child PIDs and parent exits before child

How about you do your own homework, and then ask smart questions.

Good luck.

[toc] | [prev] | [next] | [standalone]


#2375

Frombob <bob@coolfone.comze.com>
Date2012-10-22 10:23 -0700
Message-ID<bfe672f9-8a1e-4b41-8cd1-dbded3786d4b@googlegroups.com>
In reply to#2348
On Monday, October 15, 2012 3:01:07 PM UTC-5, hny wrote:
> anyone help write c code create a child process that finds the parent and child PIDs and parent exits before child

int parent_pid = getpid();

if (fork()) exit(0);

int child_pid = getpid();

[toc] | [prev] | [standalone]


Back to top | Article view | comp.programming


csiph-web