public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] OT? How to capture error messages from glibc
@ 2009-10-18 14:06 Kevin O'Gorman
  2009-10-18 14:37 ` Alan McKinnon
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin O'Gorman @ 2009-10-18 14:06 UTC (permalink / raw
  To: gentoo-user

[-- 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 --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-10-18 14:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox