linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Randi Botse <nightdecoder@gmail.com>
To: linux-c-programming@vger.kernel.org
Subject: String formatting in signal handler
Date: Sat, 20 Oct 2012 22:03:49 +0700	[thread overview]
Message-ID: <CAA6iF_48vgd8Shu-49w-3mJMSi-5eMbVGFFER5RYEkKKCkv3Nw@mail.gmail.com> (raw)

Hi List,

Almost (maybe all) function from the standard library stdio.h and
string.h are not safely to be called by signal handler. If so, how to
format string in a signal handler?. I want to log some signals which
sent to my program, the contents is for example: time, the signal
number itself, etc, and then write it to a file.

Regards.

             reply	other threads:[~2012-10-20 15:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-20 15:03 Randi Botse [this message]
2012-10-20 20:03 ` String formatting in signal handler Celelibi

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=CAA6iF_48vgd8Shu-49w-3mJMSi-5eMbVGFFER5RYEkKKCkv3Nw@mail.gmail.com \
    --to=nightdecoder@gmail.com \
    --cc=linux-c-programming@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).