1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-24 05:40:05 +08:00
SpaceVim/bundle/vimproc.vim/tools/fork.py
2020-06-14 23:42:40 +08:00

17 lines
199 B
Python

import os
import sys
import time
# Create new process
pid = os.fork()
# Print text
c = 'p' if pid == 0 else 'c'
if pid == 0:
sys.exit(0)
while True:
time.sleep(1)
sys.stderr.write(c)