~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/daemon.py

  • Committer: Martin Albisetti
  • Date: 2008-06-20 22:41:12 UTC
  • mto: (157.1.3 loggerhead)
  • mto: This revision was merged to the branch mainline in revision 187.
  • Revision ID: argentina@gmail.com-20080620224112-1l3bdtlghklx008j
 * Finished implementing Files View. Small tweaks remaining

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# daemon code from ASPN
2
 
#
3
2
 
4
3
import os
5
4
 
25
24
        try:
26
25
            pid = os.fork()     # Fork a second child.
27
26
        except OSError, e:
28
 
            raise Exception("%s [%d]" % (e.strerror, e.errno))
 
27
            raise Exception, "%s [%d]" % (e.strerror, e.errno)
29
28
 
30
29
        if pid == 0:  # The second child.
31
30
            os.chdir(WORKDIR)
54
53
 
55
54
    f = open(pidfile, 'w')
56
55
    f.write('%d\n' % (os.getpid(),))
 
56
    f.write('%s\n' % (home,))
57
57
    f.close()
58
58
 
59
59