ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: "Денис Смирнов" <mithraen@freesource.info>
To: ALT Linux Team development discussions <devel@lists.altlinux.org>
Subject: Re: [devel] thread safe fwrite
Date: Thu, 27 Jan 2011 13:54:36 +0300
Message-ID: <20110127105436.GB1812@mw.mithraen.ru> (raw)
In-Reply-To: <4D41522C.6060209@mmedia2.kemsu.ru>

[-- Attachment #1: Type: text/plain, Size: 624 bytes --]

On Thu, Jan 27, 2011 at 05:08:28PM +0600, REAL wrote:

R> А нельзя ли в самом Asterisk проверать на NULL перед вызовом fwrite?

Проверять-то можно, но только где гарантии что между проверкой и самим
вызовов соседний тред не обнулит дескриптор?

Сейчас этот [censored] Asterisk там лочит слишком много для этого, я
обернул отдельным локом этот участок.

(пытаюсь отлаживать почему эта скотина теряет 99% записей в queue_log,
причем ладно бы все терял, так нет же, почти все теряет..).

-- 
С уважением, Денис

http://mithraen.ru/
----------------------------------------------------------------------------

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2011-01-27 10:54 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-25  4:37 [devel] I: GNU gold is default linker in Fedora Kirill A. Shutemov
2011-01-25  5:30 ` Денис Смирнов
2011-01-25  8:30   ` Kirill A. Shutemov
2011-01-27  9:03     ` [devel] thread safe fwrite Денис Смирнов
2011-01-27  9:41       ` Kirill A. Shutemov
2011-01-27 10:42         ` Денис Смирнов
2011-01-27 11:08           ` REAL
2011-01-27 10:54             ` Денис Смирнов [this message]
2011-01-31 18:00 ` [devel] I: GNU gold is default linker in Fedora Dmitry V. Levin
2012-05-20 20:00   ` [devel] I: ld --no-copy-dt-needed-entries by default Dmitry V. Levin
2012-05-20 20:10     ` Led
2012-05-20 21:58       ` Dmitry V. Levin
2012-05-21  1:28         ` led
2012-05-21 23:39           ` Dmitry V. Levin
2011-01-31 19:17 ` [devel] I: GNU gold is default linker in Fedora Kirill A. Shutemov
2011-01-31 19:29   ` Alexey Tourbin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110127105436.GB1812@mw.mithraen.ru \
    --to=mithraen@freesource.info \
    --cc=devel@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git