intellectual-property software ownership
2 companies, some shared source code, 1 company gets sold - who owns what?
<p>We have two software companies.  Company A was formed 15 years ago.  Company B was formed a year ago.  These two companies do not compete, but they both access certain external APIs and massage similar data.</p>

<p>99.8% of the source code between these 2 companies is separate and different (even different languages/tech stack), but we did share some code to import in some data files to a DB, and access some public APIs.  Both company A and B have upgraded these shared files over the last year, although company A originally created them (of course).</p>

<p>We are now selling company A (talks completed, preliminary agreements signed, just waiting for official paperwork to be prepared and to meet in a few days to sign).  The group that is buying our company A is aware of company B, and we have a non-compete, even though we don't have competing products.</p>

<p>As we were preparing to package up all the source code for company A, we realized there were these little utility/import files that were also in company B's repository, and company B is dependent on them.  These "utility" source files are not by any means the "core" of either app.</p>

<p>However, company B does not have time to clean-room rewrite these files, plus we have to go through re-certification with the API owners if we change our source code (which takes time).</p>

<p>We don't want to stall or risk the sale of company A, but we want to stay within the US law.</p>

<p>So in a situation like this, are these little utility files shared IP?</p>

<p>Is there something we can do before the sale ends to protect us, such as company A selling a branch of these files to company B?</p>

<p>We want to be honest but we don't want to open up a can of worms right before the close of sale, because we are worried that it might cause panic where there is not cause for any.</p>

<p>Any precedents or thoughts here?</p>

<p>Thank you.</p>

<p>Tell whatever lawyer is drafting the "official paperwork" about the problem and ask if it is covered or if you need to change the text or add a rider.  If neither company competes, a mutual release/license of existing shared code should be perfectly manageable for an experienced attorney.</p>
