I'm not even remotely in this situation and probably never will be, but I'm curious how this can work legally.
Sure copying the code is easy but isn't there the problem that the rights to it (to sell, to use in a different product) are difficult to distribute among several partners.
Wouldn't a potential future buyer of the IP want to make sure that he buys exclusive rights? Otherwise the other partner could just sell the same code to the competition. Same goes for patents etc..
I have no experience with such things so I might missing something very obvious here.