2 added 422 characters in body
source | link

It is implementation specific (notably ABI & calling convention specific).

Many language implementations provide a way to call a function (in the same program and process) in some other language (often C). It could be called foreign function interface.

For Java, read about JNI.

For Python, read about Extending & Embedding the Python Interpreter.

For Ocaml, read the chapter about Interfacing C with Ocaml.

etc....

 

But what if those programs were written in different languages? You could conceivably use files, but are there any other ways of communicating?

Yes, it is called inter-process communication. Linux provide many ways to do that thru its system calls (listed in syscalls(2)...), pipe(7)-s, socket(7)-s, signal(7)-s, shm_overview(7), sem_overview(7) etc etc...

Read also Operating Systems : Three Easy Pieces

It is implementation specific (notably ABI & calling convention specific).

Many language implementations provide a way to call function in some other language (often C). It could be called foreign function interface.

For Java, read about JNI.

For Python, read about Extending & Embedding the Python Interpreter.

For Ocaml, read the chapter about Interfacing C with Ocaml.

etc....

You could conceivably use files, but are there any other ways of communicating?

Yes, it is called inter-process communication. Linux provide many ways to do that thru its system calls (listed in syscalls(2)...)

Read also Operating Systems : Three Easy Pieces

It is implementation specific (notably ABI & calling convention specific).

Many language implementations provide a way to call a function (in the same program and process) in some other language (often C). It could be called foreign function interface.

For Java, read about JNI.

For Python, read about Extending & Embedding the Python Interpreter.

For Ocaml, read the chapter about Interfacing C with Ocaml.

etc....

 

But what if those programs were written in different languages? You could conceivably use files, but are there any other ways of communicating?

Yes, it is called inter-process communication. Linux provide many ways to do that thru its system calls (listed in syscalls(2)...), pipe(7)-s, socket(7)-s, signal(7)-s, shm_overview(7), sem_overview(7) etc etc...

Read also Operating Systems : Three Easy Pieces

1
source | link

It is implementation specific (notably ABI & calling convention specific).

Many language implementations provide a way to call function in some other language (often C). It could be called foreign function interface.

For Java, read about JNI.

For Python, read about Extending & Embedding the Python Interpreter.

For Ocaml, read the chapter about Interfacing C with Ocaml.

etc....

You could conceivably use files, but are there any other ways of communicating?

Yes, it is called inter-process communication. Linux provide many ways to do that thru its system calls (listed in syscalls(2)...)

Read also Operating Systems : Three Easy Pieces