Here's a patch that applies to lastfmsubmitd 0.36.

Cheers,

-- 
Adeodato Simó                                     dato at net.com.org.es
Debian Developer                                  adeodato at debian.org
 
I promise you. Once I enter into an exclusive relationship, I sleep with
very few people.
                -- Denny Crane
=== modified file 'lastfmsubmitd'
--- lastfmsubmitd	2007-11-21 18:18:30 +0000
+++ lastfmsubmitd	2007-11-21 18:23:08 +0000
@@ -361,10 +361,18 @@
             print >>sys.stderr, "lastfmsubmitd: can't fork: %s" % e
             sys.exit(1)
 
+    devnull = os.open('/dev/null', os.O_RDWR)
+    os.dup2(devnull, sys.stdin.fileno())
+    os.close(sys.stdout.fileno())
+    os.close(sys.stderr.fileno())
+    os.close(devnull)
+
     cli = lastfm.client.Daemon(DAEMON_NAME, conf)
     cli.open_log(debug, stderr)
     cli.write_pidfile()
 
+    os.dup2(1, 2) # errors, eg. tracebacks, to the log file
+
     try:
         cli.log.info('Starting')
         daemon(cli, online)

Reply via email to