From: Pedro Alves <pedro@codesourcery.com>
To: Doug Evans <dje@google.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] Remove set debug lin-lwp-async, new ui_file.to_write_async_safe
Date: Tue, 10 May 2011 21:30:00 -0000 [thread overview]
Message-ID: <201105102230.29758.pedro@codesourcery.com> (raw)
In-Reply-To: <20110510204641.A4C73246199@ruffy.mtv.corp.google.com>
On Tuesday 10 May 2011 21:46:41, Doug Evans wrote:
> static void
> +stdio_file_write_async_safe (struct ui_file *file,
> + const char *buf, long length_buf)
> +{
> + struct stdio_file *stdio = ui_file_data (file);
> +
> + if (stdio->magic != &stdio_file_magic)
> + {
> + const char *msg = _("stdio_file_write_async_safe: bad magic number\n");
> + write (2, msg, strlen (msg));
> + return;
> + }
> +
> + write (fileno (stdio->file), buf, length_buf);
fileno is not required to be async signal safe by posix, AFAIK.
(nor are strlen or _/gettext either).
[gdbserver calls write/sizeof directly in linux-low.c,
if you haven't seen it]
--
Pedro Alves
next prev parent reply other threads:[~2011-05-10 21:30 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-10 20:47 Doug Evans
2011-05-10 20:51 ` Doug Evans
2011-05-10 21:30 ` Pedro Alves [this message]
2011-05-10 22:19 ` Doug Evans
2011-05-11 7:39 ` Jan Kratochvil
2011-05-11 15:50 ` Doug Evans
2011-05-13 17:32 ` Doug Evans
2011-05-13 19:05 ` Stan Shebs
2011-05-14 5:45 ` Doug Evans
2011-05-10 21:38 ` Pedro Alves
2011-05-10 22:20 ` Doug Evans
2011-05-11 2:50 ` Eli Zaretskii
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=201105102230.29758.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=dje@google.com \
--cc=gdb-patches@sourceware.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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox