Skip to content
  • Federico Mena Quintero's avatar
    Use the write-to-a-pipe trick from the signal handler instead of queueing · 3b441167
    Federico Mena Quintero authored
    2006-11-23  Federico Mena Quintero  <federico@novell.com>
    
    	Use the write-to-a-pipe trick from the signal handler instead of
    	queueing an idle handler from there.
    
    	* src/nautilus-main.c (setup_debug_log_signals): Set up a pair of
    	pipes for the SIGUSR1 handler; set up a GIOChannel on them.
    	(sigusr1_handler): Write a byte to our pipe instead of queueing an
    	idle handler.
    	(debug_log_io_cb): Replaces dump_debug_log_idle_cb().  Read from
    	the pipe, and dump the debug log.
    
    	Add a configuration file for the logging mechanism.  You create
    	~/nautilus-debug-log.conf as a GKeyFile.
    
    	* libnautilus-private/nautilus-debug-log.c
    	(nautilus_debug_log_load_configuration): New function; loads the
    	configuration from a key file like this:
    
    		[debug log]
    		enable domains = foo; bar; baz
    		max lines = 1000
    
    	* libnautilus-private/nautilus-debug-log.c (dump_configuration):
    	New utility function.
    	(nautilus_debug_log_dump): At the end of the log, d...
    3b441167