This would only apply if they were distributing the GPL licensed code alongside their own code.

If my MIT-licensed one-line Python library has this line of code…

  run([“bash”, “-c”, “echo hello”])
…I’m not suddenly subject to bash’s licensing. For anyone wanting to run my stuff though, they’re going to need to make sure they themselves have bash installed.

(But, to argue against my own point, if an OS vendor ships my library alongside a copy of bash, do they have to now relicense my library as GPL?)

The FSF thinks it counts as a derivative work and you have to use the LGPL to allow linking.

However, this has never actually been proven in court, and there's many good arguments that linking doesn't count as a derivative work.

Old post by a lawyer someone else found (version 3 wouldn't affect this) [1]

For me personally I don't really understand how, if dynamic linking was viral, using linux to run code isn't viral. Surely at some level what linux does to run your code calls GPLed code.

It doesn't really matter though, since the FSF stance is enough to scare companies from not using it, and any individual is highly unlikely to be sued.

[1] https://www.linuxjournal.com/article/6366

> For me personally I don't really understand how, if dynamic linking was viral, using linux to run code isn't viral. Surely at some level what linux does to run your code calls GPLed code.

The Linux kernel has an explicit exception for userspace software:

> NOTE! This copyright does not cover user programs that use kernel services by normal system calls

And the GPL also has an explicit exception for "system" software such as kernel, platform libraries etc.:

> The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.

> The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work.

> This would only apply if they were distributing the GPL licensed code alongside their own code.

As far as I understand the FSF's interpretation of their license, that's not true. Even if you only dynamically link to GPL-licensed code, you create a combined work which has to be licensed, as a whole, under the GPL.

I don't believe that this extends to calling an external program via its CLI, but that's not what the code in question seems to be doing.

(This is not an endorsement, but merely my understanding on how the GPL is supposed to work.)

This is a false analogy. It's quite straightforward.

Running bash (via exec()/fork()/spawn()/etc) isn't the same as (statically or dynamically) linking with its codebase. If your MIT-licensed one-liner links to code that's GPL licensed, then it gets infected by the GPL license.

I've seen people use IPC to workaround the GPL, but I've also seen the FSF interpretations claiming that is still a derived work.

I don't know if this has ever been tested in court.

My interpretation of their FAQ[1] on it is that shelling out and IPC are fine, while linking is not. As you say, it's ultimately up to the courts to decide on.

[1]: https://www.gnu.org/licenses/gpl-faq.html#MereAggregation

you are correct. its about linking as in LD does it, not conceptual linking.

GPL is for boomers at this point. Floppy disks? Distribution? You can use a tool but you cant change it? A DLL call means you need to redistribute your code but forking doesn't?

Sillyness

GPL post-dates network software distribution (we got our first gcc via ftp).

Yes, but if you use open source libraries for your closed source SaaS - thats fine. People get their software _over_ the network delivered to them in a VM (your browser).