Created
August 15, 2011 00:44
-
-
Save boon-code/1145526 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| from multiprocessing import Process | |
| from ctypes import CDLL | |
| import sys | |
| import os | |
| libc = CDLL("libc.so.6") | |
| prctl = libc.prctl | |
| def f(name): | |
| print('hello', name) | |
| prctl(22, 1, 0) | |
| print("some other text") | |
| with open('some-file.txt', 'w') as f: | |
| f.write("Hallo") | |
| print("wrote text file") | |
| a = 7 | |
| if __name__ == '__main__': | |
| p = Process(target=f, args=('bob',)) | |
| p.start() | |
| p.join() | |
| print(p.exitcode) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment