Suppose there are two torified programs that are simultaneously running in the shell on the same computer (which uses a single network interface). Are the external IP addresses assigned to the two programs by tor the same or different? Thanks.
Different programs may share the same circuits. On the Tor design, section 4.2
In Tor, each circuit can be shared by many TCP streams. To avoid delays, users construct circuits preemptively.
A different issue is that different circuits may have the same exit node, which in case you check the external IP, they will look the same.
You can see the info of the circuits you have opened if you have the ControlPort enabled. You can find more info about the Control Protocol here.
To maximally decrease this probability - use a different proxy authentication credentials. Tor checks if there's a different auth provided - it has to be a different path. Use any username and password you wish, they just has to be different. But - anyway - check the exit node's IP, this is not an ensurance