torsocks should support isolating on a per process basis.
legacy/trac#16004 (moved) + legacy/trac#14132 (moved) would be the better way to handle this since it allows doing this for more than torsocks, but as something that can happen in the mean time (or if the user doesn't want to use AF_UNIX based SOCKSSocket), there's no reason that torsocks can't do this automatically.
Rough idea:
IsolatePid 0|1
Automatically set the SOCKS5 username/password to a unique per-process value
that makes the connections to Tor use a different circuit from other existing
streams on a per-application basis. If set, the SOCKS5Username and
SOCKS5Password options must not be set. (Default: 0)
The implementation would stash the pid/time(NULL)
on startup and use pid:TIME
(both ASCII serialized) as the SOCKS5 username/password pair for all SOCKS connections.