daily pastebin goal
14%
SHARE
TWEET

Untitled

a guest May 17th, 2011 112 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import os
  2. import sys
  3.  
  4. print 'Content-type: text/html\n\n Done\x04'
  5. sys.stdout.flush()
  6.  
  7. if os.fork():
  8.     sys.exit(0)
  9.  
  10. os.setsid()
  11.  
  12. if os.fork():
  13.    sys.exit(0)
  14.  
  15. # Second child
  16. os.chdir("/")
  17. sys.stdout.close()
  18. sys.stderr.close()
  19. sys.stdin.close()
  20.  
  21. f = open('/tmp/lol.txt', 'w')
  22.  
  23. while 1:
  24.     f.write('test\n')
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top