This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Fix the race between atexit() and exit()
- From: "Carlos O'Donell" <carlos at systemhalted dot org>
- To: Anoop <acv at linux dot vnet dot ibm dot com>
- Cc: libc-help <libc-help at sourceware dot org>, suzuki at in dot ibm dot com
- Date: Wed, 4 Jun 2008 09:54:16 -0400
- Subject: Re: [PATCH] Fix the race between atexit() and exit()
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=DgJ3arE5AP0qryD9gZkrcseKeluyKfFmWOCtp4Fqe+w=; b=KCSwOzVtmHZH0YBa8rF/5G9MpnlZkfsg1K5iBrVk2gkIe9MelO6y06YqfLpq3qKlfy 3fBGhOW9r6tkUCKENgATQsZKn3Qx4Bz3nVcCPdZ0xbSr5fbWWMMZ2q5ezYnz5ZwlJjYP zhaqXQJz7fhTqJqsMfZQnjpqMAB3T5ZVhoHoI=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=O1Flk6RNuKCESML3+pF1s45eW/5wy6RSDuaxGlX7rsO4lffulwOPo1XciT+dGyYYfE k4x17ZWvcROaZCgwesTYDL9ESBGu6sWsASwOYZ12H5uYs1iL2HqOoEGsq7ozObcC2O0o +2CZAI8MGi1bxyqjehtDw6iC549AiQwOarIKY=
- References: <20080603122353.401tp2lfk00cgso0@imap.linux.ibm.com> <119aab440806031649k1b33fb96ka775c947fa8dea73@mail.gmail.com> <484694EB.20606@linux.vnet.ibm.com>
On Wed, Jun 4, 2008 at 9:13 AM, Anoop <acv@linux.vnet.ibm.com> wrote:
> Though it doesnt say it is thread safe, atexit() is not listed in the
> thread-unsafe functions listed in sextion 2.9.1 -
> http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_09.html#tag_02_09_01
> where it says - All functions defined by this volume of IEEE Std 1003.1-2001
> shall be thread-safe, except that the following functions need not be
> thread-safe.
Once you call exit(), don't all the consequence apply e.g. the parent
process is destroyed, and all children are zombies. This implies that
any additional atexit() registered handlers do *not* have to be run
since the parent has already exited, and will never do so again?
Cheers,
Carlos.