Skip to content

Instantly share code, notes, and snippets.

View nginx.sh
# /etc/init.d/nginx
#! /bin/sh
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
View proc.py
from multiprocessing import Process
import os
import time
import setproctitle
setproctitle.setproctitle('subprocess')
def targ(x):
setproctitle.setproctitle('subprocess_' + str(x))
print '这是一个进程任务' + str(os.getpid())
@period331
period331 / proc.py
Created Dec 11, 2013
python subProcess problem
View proc.py
# coding: utf8
from multiprocessing import Process
import os
import time
import setproctitle
setproctitle.setproctitle('subprocess')
def targ(x):