~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/daemon.py

  • Committer: Max Bowsher
  • Date: 2011-03-10 14:22:12 UTC
  • mto: This revision was merged to the branch mainline in revision 432.
  • Revision ID: maxb@f2s.com-20110310142212-7xp32hm90lq7zz0d
Remove more things related to the removed code.

Show diffs side-by-side

added added

removed removed

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