DarkMatter in Cyberspace
  • Home
  • Categories
  • Tags
  • Archives

bat脚本的非阻塞调用


例如现在要启动3个Server,每个都监听一个端口,因此需要在调用脚本之外的进程里运行,这就需要start命令:

start F:\Software\Python27\python.exe blocking-server/slowpoetry.py --port 10000 poetry/ecstasy.txt --num-bytes 30 start F:\Software\Python27\python.exe blocking-server/slowpoetry.py --port 10001 poetry/fascination.txt start F:\Software\Python27\python.exe blocking-server/slowpoetry.py --port 10002 poetry/science.txt

如果用call取代start,脚本会阻塞在第一个调用中,直到第一个调用返回才启动第二个。

使用set为变量赋值时,注意等号左右不要留空格,否则变量名和变量值会包括这些空格。



Published

Apr 20, 2012

Last Updated

Apr 20, 2012

Category

Tech

Tags

  • bat 3
  • dos 3
  • Windows 67

Contact

  • Powered by Pelican. Theme: Elegant by Talha Mansoor