2

mplayer is a GPL v2 license.

There is a program called a.out that calls mplayer.
The a.out source code is shown below.

#include <stdio.h>

void main(void){

        system("mplayer test.mp4");

}

In this case, a.out uses mplayer.
Do I need to provide a.out source code in accordance with GPL v2?
I understand that a.out does not follow the GPL when running as a command line.
I know that you do not have to provide a.out source code.
Am I correct understanding?

2
  • 1
    You ask "Do I need to provide a.out source code in accordance with GPL v2?" but then state "I know that you do not have to provide a.out source code." That statement makes me confused about what you're asking, exactly. (See also: gnu.org/licenses/gpl-faq.en.html#GPLPlugins)
    – apsillers
    Sep 5, 2017 at 14:09
  • @apsillers I wondered if I understood correctly. The materials I have found are only explained and there is no example.I am correct understanding. Thank you.
    – DonBit
    Sep 6, 2017 at 0:18

1 Answer 1

4

Using system is spawning mplayer in a new process. The GPL and its FAQ are rather clear on this topic e.g. "mere aggregation":

[...] By contrast, pipes, sockets and command-line arguments are communication mechanisms normally used between two separate programs. So when they are used for communication, the modules normally are separate programs. [...]

Here you use "command line arguments" to launch mplayer so I would say that mplayer and your own program are separate. And separate programs means that they can have different licenses.

This not different from launching a tool from a shell or a file manager: the tool license does not impact the licensing of the shell or file manager used to launch the tool.

Therefore:

Do I need to provide a.out source code in accordance with GPL v2?

No.

I know that you do not have to provide a.out source code. Am I correct understanding?

Yes.

And if you redistribute mplayer itself, side-by-side with your code, then of course the GPL still applies to mplayer's code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.