public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Kevin O'Gorman" <kogorman@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: [gentoo-user] OT? How to capture error messages from glibc
Date: Sun, 18 Oct 2009 07:06:38 -0700	[thread overview]
Message-ID: <9acccfe50910180706t2495a6c1u54845b4ecd733b06@mail.gmail.com> (raw)

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

This may be OT, inasmuch as it's not gentoo-specific.  It's here because my
system runs Gentoo and I don't know where else to ask.  If it annoys, just
point me in the right direction to where it will not be OT, please.

I'm trying to write scripts to help me grade student submissions in a
systems programming course.  Students are just learning about malloc/free
and some are floundering.  I'm seeing lots of errors that are caught by
glibc (with some help from compiling with -D_FORTIFY_SOURCE=2), but I would
like instead to capture those messages in a file.  It appears that glibc
does not use stdin or stderr for these messages, since I cannot redirect
them.  I suspect they are being sent to /dev/tty.

Is there any wizardry that would allow capture of these messages?  I know
that somehow the script(1) command captures such stuff, but it's not useable
since I want all of this scripted and ironically script(1) does not seem to
play nice with scripts.  I also know that this is about to tip me into the
abyss of session leaders and controlling terminals, but I'll try to be
brave.

-- 
Kevin O'Gorman, PhD

[-- Attachment #2: Type: text/html, Size: 1194 bytes --]

             reply	other threads:[~2009-10-18 14:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-18 14:06 Kevin O'Gorman [this message]
2009-10-18 14:37 ` [gentoo-user] OT? How to capture error messages from glibc Alan McKinnon

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=9acccfe50910180706t2495a6c1u54845b4ecd733b06@mail.gmail.com \
    --to=kogorman@gmail.com \
    --cc=gentoo-user@lists.gentoo.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