[Bug 674930] New: Logging to a file causes loss of logs when forking
bugzilla at gnome.org
Fri Apr 27 02:46:16 PDT 2012
GStreamer | gstreamer (core) | 0.10.x
Summary: Logging to a file causes loss of logs when forking
Component: gstreamer (core)
AssignedTo: gstreamer-bugs at lists.freedesktop.org
ReportedBy: vincent.penquerch at collabora.co.uk
QAContact: gstreamer-bugs at lists.freedesktop.org
GNOME version: ---
GST_DEBUG=5 GST_DEBUG_FILE=gst.log gst-inspect -a
gst.log will be corrupt. This happens when more than one process spawned by the
gst using program tries to open the log file for writing.
I guess it could be solved by having a semaphore protect writes to the file,
but that might cause a large slowdown (not tried).
Preventing all but the first log prevents the corruption, but also loses the
logs from those processes.
Another way could be to let subsequent processes open a different file, maybe
named with their PID as a suffix (maybe using % format string in the
GST_DEBUG_FILE variable, such as "gst.%p.log", and replacing %p by PID. Could
do that for date/time too).
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs