IPC via named pipe: Difference between revisions

m
m (syntax highlighting fixup automation)
m (→‎{{header|Wren}}: Minor tidy)
Line 578:
 
This works fine on Ubuntu 20.04 and should work on other Linux distros though I can't vouch for anything else.
<syntaxhighlight lang="ecmascriptwren">/* ipc_via_named_pipeIPC_via_named_pipe.wren */
 
var InputFifo = "in"
Line 634:
<br>
We now embed this script in the following C program, build and run from one terminal.
<syntaxhighlight lang="c">/* gcc ipc_via_named_pipeIPC_via_named_pipe.c -o ipc_via_named_pipeIPC_via_named_pipe -lpthread -lwren -lm */
 
#include <stdio.h>
Line 783:
vm2 = wrenNewVM(&config);
const char* module = "main";
const char* fileName = "ipc_via_named_pipeIPC_via_named_pipe.wren";
char *script = readFile(fileName);
WrenInterpretResult result = wrenInterpret(vm, module, script);
9,482

edits