[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ale] Clones and printf()


I've been working on a multithreaded program in which my parent keeps
getting SIGSEGV.  It appears to
get this condition during an attempt to speak().  speak is a library call I
wrote that bacially does the

1) open syslog
2) creates a message using vsprintf
3) write to syslog
4) close syslog

Each excution of speak does those things.  I read in a 2001 document that I
should avoid
printf's with clone.  Does this still hold true?  My data looks perfectly
allocated and it does
not appear that I have memory corruption but that could still be prossible.
I basically keep
track of drones in a linked list and keep track of tasks in a linked list.
Each drone gets assigned 1
task.  Parent tracks the drones using the first list.  drone keeps track of
data only in
the trak it is assigned.  The parent and drones never write to the same
variable.  Drone
modifies a field then parent knows to process data.


This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.