Skip to content

mattiskan/forksrv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Forksrv

Provides the base for running a cmd in a separate process.

I use this to do expensive imports so I can run tests in a memory copy, but the contract is pretty generic.

Example Usage:

# start server
$ python forksrv/forksrv.py server
# Run commands in different terminal on same machine
(virtualenv_run) mylaptop:forksrv mattis$ python forksrv/forksrv.py client echo hello
sending cmd: echo hello
hello

(virtualenv_run) mylaptop:forksrv mattis$ python forksrv/forksrv.py client python
sending cmd: python
Python 3.6.2 (default, Jul 17 2017, 16:44:45)
[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.42)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()

About

Running things in a fork of a separate process

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published