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


Groups > comp.programming > #2375

Re: parent exits before child process

Newsgroups comp.programming
Date 2012-10-22 10:23 -0700
References <5cadneA_Lo4f9uHNnZ2dnUVZ_qCdnZ2d@giganews.com>
Message-ID <bfe672f9-8a1e-4b41-8cd1-dbded3786d4b@googlegroups.com> (permalink)
Subject Re: parent exits before child process
From bob <bob@coolfone.comze.com>

Show all headers | View raw


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();

Back to comp.programming | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

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

csiph-web