LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 01-22-2010, 02:30 AM   #1
ocaoca
LQ Newbie
 
Registered: Jul 2007
Posts: 1

Rep: Reputation: 0
memory corruption and the use or not of MALLOC_CHECK_


a program can have a memory corruption or a double free. therefore, I can use MALLOC_CHECK_ to debug, which is fine. However, I don't want to use this variable in production because it impairs performance and its purpose is for debugging. In this case, I have another problem. If MALLOC_CHECK_ is unset, glibc writes info in some channels, which can be /dev/tty or stderr or syslog. a program that is a server usually wants to detache from the console, which is my case. a server should also close stdin, stdout and stderr, which is my case as well. In my case, glibc can write in stderr, but the fd = 2 can be in use for my purpose (a file, a socket, whatever, but not stderr anymore). Therefore, I'll have glibc write in my file descriptor. what i could is to open /dev/null to 2 so to use the file desciptror.
What I would like to do is to prevent glibc from writing into stderr. I look up the internet for any kernel parameter, but I haven't found anything so far.
Can I configure something to control the behaviour of glibc?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
why MALLOC_CHECK_? sr_sanjeev Linux - General 4 03-20-2008 03:12 PM
malloc() memory corruption (C++) Coxynelle Programming 1 01-17-2007 04:07 PM
glibc detected ; memory corruption pingu Linux - Software 3 10-12-2005 01:29 AM
reboot corruption memory (slack 9.1) muhkuhmasta Slackware 4 07-21-2004 02:21 AM
Memory Corruption on AGP Video Card?! beutin Linux - Hardware 0 07-10-2003 05:37 AM


All times are GMT -5. The time now is 10:27 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration