From: Alan McKinnon <alan.mckinnon@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] OT? How to capture error messages from glibc
Date: Sun, 18 Oct 2009 16:37:07 +0200 [thread overview]
Message-ID: <200910181637.07762.alan.mckinnon@gmail.com> (raw)
In-Reply-To: <9acccfe50910180706t2495a6c1u54845b4ecd733b06@mail.gmail.com>
On Sunday 18 October 2009 16:06:38 Kevin O'Gorman wrote:
> 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.
My first thought was way out on left field:
could you use syslog-ng to read /dev/tty?
--
alan dot mckinnon at gmail dot com
prev parent reply other threads:[~2009-10-18 14:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-18 14:06 [gentoo-user] OT? How to capture error messages from glibc Kevin O'Gorman
2009-10-18 14:37 ` Alan McKinnon [this message]
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=200910181637.07762.alan.mckinnon@gmail.com \
--to=alan.mckinnon@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