WP7607-1 IPC using pipes

Hi everyone,

I have the following idea but don’t know how to implement it.
One C script sends a string to another C script using pipes. After that, the latter script forwards that string to Putty via UART1.

These are the C files that can already communicate with each other:

/* send.c */ 
#include <stdio.h> 
#include <stdlib.h>
#include <unistd.h>

#include <fcntl.h>
#include <string.h>
#include <sys/select.h>
#include <sys/types.h>    
#include <errno.h>
#include <time.h>

#define BUF 20

int main(){
	char message[BUF] = "Test message";
 	int fd = open("fifo", O_WRONLY);

    if (fd == -1){
    	printf("fd ==1\n");
    	return 1;
    }

    if(write(fd, &message, strlen(message)) == -1){
    	return 2;
    }
    printf("This message was sent: %s\n", message);
    close(fd);

    return 0;
}

/*recv.c */
#include <stdio.h> 
#include <stdlib.h> 
#include <unistd.h>

#include <fcntl.h>
#include <string.h> 
#include <sys/select.h>
#include <sys/types.h>    
#include <errno.h>
#include <time.h>

#define BUF 40

int main(){
	char message[BUF];
	int fd = open("fifo", O_RDONLY);

	if (fd == -1){
		printf("fd ==1\n");
		return 1;
	}

	if(read(fd, &message, BUF) == -1){
		return 2;
	}
	printf("Received this message: %s\n", message);
	close(fd);

    return 0;
}

Basically, my plan is to have two apps communicate using pipes.
Any ideas how to do that?

I’ve found this https://docs.legato.io/14_10/componenthello_i_p_c.html#helloIPCDefiningTheAPI
but it doesn’t seem to be intended for pipes.

Thanks,
Thomas

You can see here on how to send data to another app by ipc

Thank you for your quick response @jyijyi.
This is not quite what I was looking for though.

Do you happen to know if it’s possible for two apps to communicate with each other using pipes?

Didn’t the idea of legato ipc is the same

I have a Legato application in ‘C’ that communicates with a Python script using a named pipe, so yes you can do it. It uses Posix calls only.

Hey pinst,

I just want to be sure I’ve understood what you described.
So you have a single app running on the module (written in C) that can communicate with another script written in Python (not installed on the module) using a pipe?

Yes that’s right. The python script is run at the command prompt, e.g. python xyz.py

Okay, thanks for confirming that.

I am looking for a way of communicating between two separate apps using pipes.
Or is there generally no possibility for two apps to communicate via pipes?

Is it possible to have two separate C scripts communicate via pipes in one single app though?

I don’t see why two apps shouldn’t be able to communicate using a named pipe. You would have to take care that they have the right permissions if sandboxed.

Is there any simple example that demonstrates that?

I don’t know any specific examples. But the named pipe is accessed just like a file. My C application does the writing and the python does the reading. You could have two C applications one writing and one reading.

It would be best to test one application at a time, you could just run cat from the shell to test the writing and reading apps separately.

I just made two apps, one that sends a string and another one that should receive it.
The pipe, which I have created under /home/root/, is accessed in both of these files inside the the open function.

root@swi-mdm9x28-wp:~# ls
fifo


// send.c
#include "legato.h"
#include <stdio.h> 
#include <stdlib.h>
#include <unistd.h>

#include <fcntl.h>
#include <string.h>
#include <sys/select.h>
#include <sys/types.h>    
#include <errno.h>
#include <time.h>

#define BUF 20

int main();

COMPONENT_INIT{ 
	LE_INFO("#####Inside send COMPONENT_INIT.#####");

    main();
}

int main(){
    char message[BUF] = "####Test message####";
    int fd = open("/home/root/fifo", O_WRONLY);
    LE_INFO("##### SEND Just opened the fifo.##### %d", fd);

    if (fd == -1){
        printf("fd ==1\n");
        LE_INFO("##### SEND: opening the fifo has failed.#####");
        return 1;
    }

    if(write(fd, &message, strlen(message)) == -1){
	    LE_INFO("##### SEND: writing the message has failed.#####");
	    return 2;
    }
    LE_INFO("%s", message);
    printf("This message was sent: %s\n", message);
    close(fd);

    return 0;
}

//recv.c
#include "legato.h"
#include <stdio.h> 
#include <stdlib.h>
#include <unistd.h>

#include <fcntl.h>
#include <string.h>
#include <sys/select.h>
#include <sys/types.h>    
#include <errno.h>
#include <time.h>

#define BUF 40

int main();

COMPONENT_INIT{ 
    LE_INFO("#####Inside recv COMPONENT_INIT.#####");

    main();
}

int main(){
    char message[BUF];
    int fd = open("/home/root/fifo", O_RDONLY);
    LE_INFO("#####Just opened the fifo.##### %d", fd);

    if (fd == -1){
	    printf("fd ==1\n");
	    LE_INFO("##### RECV: opening the fifo has failed.#####");
	    return 1;
    }

    if(read(fd, &message, BUF) == -1){
	    LE_INFO("##### RECV: receiving the message has failed.#####");
	    return 2;
    }
    printf("Received this message: %s\n", message);
    LE_INFO("%s", message);
    close(fd);

    return 0;
}

Unfortunately, I get the following error message when starting the send app:

Oct 27 14:46:46 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c app_Create() 3207 | Creating app 'pipesSend'
Oct 27 14:46:46 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | proc.c GetFaultAction() 323 | No fault action specified for process 'pipesSend'. Assuming 'ignore'.
Oct 27 14:46:46 swi-mdm9x28-wp user.warn Legato: -WRN- | supervisor[833]/supervisor T=main | proc.c GetWatchdogAction() 359 | pipesSend watchdogAction '' in proc section
Oct 27 14:46:46 swi-mdm9x28-wp user.warn Legato: -WRN- | supervisor[833]/supervisor T=main | proc.c GetWatchdogAction() 359 | pipesSend watchdogAction '' in proc section
Oct 27 14:46:46 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c app_Start() 3420 | Starting app 'pipesSend'
Oct 27 14:46:47 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2104 | Created file link '/dev/log' to '/legato/systems/current/appsWriteable/pipesSend/dev/log'.
Oct 27 14:46:47 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2104 | Created file link '/dev/null' to '/legato/systems/current/appsWriteable/pipesSend/dev/null'.
Oct 27 14:46:47 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2104 | Created file link '/dev/zero' to '/legato/systems/current/appsWriteable/pipesSend/dev/zero'.
Oct 27 14:46:47 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2104 | Created file link '/legato/systems/current/lib/liblegato.so' to '/legato/systems/current/appsWriteable/pipesSend/lib/liblegato.so'.
Oct 27 14:46:47 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2104 | Created file link '/lib/ld-linux.so.3' to '/legato/systems/current/appsWriteable/pipesSend/lib/ld-linux.so.3'.
Oct 27 14:46:47 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2104 | Created file link '/lib/libc.so.6' to '/legato/systems/current/appsWriteable/pipesSend/lib/libc.so.6'.
Oct 27 14:46:47 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2104 | Created file link '/lib/libpthread.so.0' to '/legato/systems/current/appsWriteable/pipesSend/lib/libpthread.so.0'.
Oct 27 14:46:47 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2104 | Created file link '/lib/librt.so.1' to '/legato/systems/current/appsWriteable/pipesSend/lib/librt.so.1'.
Oct 27 14:46:47 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2104 | Created file link '/lib/libdl.so.2' to '/legato/systems/current/appsWriteable/pipesSend/lib/libdl.so.2'.
Oct 27 14:46:47 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2104 | Created file link '/lib/libgcc_s.so.1' to '/legato/systems/current/appsWriteable/pipesSend/lib/libgcc_s.so.1'.
Oct 27 14:46:47 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2104 | Created file link '/lib/libm.so.6' to '/legato/systems/current/appsWriteable/pipesSend/lib/libm.so.6'.
Oct 27 14:46:47 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2104 | Created file link '/usr/lib/libstdc++.so.6' to '/legato/systems/current/appsWriteable/pipesSend/lib/libstdc++.so.6'.
Oct 27 14:46:47 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2104 | Created file link '/legato/systems/current/apps/pipesSend/read-only/lib/libComponent_pipesSendComponent.so' to '/legato/systems/current/appsWriteable/pip
Oct 27 14:46:47 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2104 | Created file link '/legato/systems/current/apps/pipesSend/read-only/bin/pipesSend' to '/legato/systems/current/appsWriteable/pipesSend/bin/pipesSend'.
Oct 27 14:46:47 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateTmpFs() 1738 | Mounted tmpfs at /legato/systems/current/appsWriteable/pipesSend/tmp.
Oct 27 14:46:47 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2104 | Created file link '/tmp/legato/serviceDirectoryServer' to '/legato/systems/current/appsWriteable/pipesSend/tmp/legato/serviceDirectoryServer'.
Oct 27 14:46:47 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2104 | Created file link '/tmp/legato/serviceDirectoryClient' to '/legato/systems/current/appsWriteable/pipesSend/tmp/legato/serviceDirectoryClient'.
Oct 27 14:46:47 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxCoreDumpFileBytes to value 102400.
Oct 27 14:46:47 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxFileBytes to value 102400.
Oct 27 14:46:47 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxLockedMemoryBytes to value 8192.
Oct 27 14:46:47 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxFileDescriptors to value 256.
Oct 27 14:46:47 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxMQueueBytes to value 512.
Oct 27 14:46:47 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxThreads to value 20.
Oct 27 14:46:47 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxQueuedSignals to value 100.
Oct 27 14:46:47 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | proc.c proc_Start() 1390 | Starting process 'pipesSend' with pid 6771
Oct 27 14:46:47 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[6771]/supervisor T=main | proc.c proc_Start() 1355 | Execing 'pipesSend'
Oct 27 13:46:47 swi-mdm9x28-wp user.debug Legato:  DBUG | _UNKNOWN_[6771]/framework T=unknown | LE_FILENAME InitPool() 295 | Memory pool name 'framework.hashMap_refPathIteratorMap' is truncated to 'framework.hashMap_refPathIterat'
Oct 27 13:46:47 swi-mdm9x28-wp user.debug Legato:  DBUG | _UNKNOWN_[6771]/framework T=main | LE_FILENAME InitPool() 295 | Memory pool name 'framework.hashMap_refEventHandlers' is truncated to 'framework.hashMap_refEventHandl'
Oct 27 13:46:47 swi-mdm9x28-wp user.debug Legato:  DBUG | _UNKNOWN_[6771]/framework T=main | LE_FILENAME InitPool() 295 | Memory pool name 'framework.hashMap_refDefault Timer SafeRe' is truncated to 'framework.hashMap_refDefault Ti'
Oct 27 13:46:47 swi-mdm9x28-wp user.debug Legato:  DBUG | _UNKNOWN_[6771]/framework T=main | LE_FILENAME InitPool() 295 | Memory pool name 'framework.MessagingClientInterfaces' is truncated to 'framework.MessagingClientInterf'
Oct 27 13:46:47 swi-mdm9x28-wp user.debug Legato:  DBUG | _UNKNOWN_[6771]/framework T=main | LE_FILENAME InitPool() 295 | Memory pool name 'framework.hashMap_refHandlersRef' is truncated to 'framework.hashMap_refHandlersRe'
Oct 27 13:46:47 swi-mdm9x28-wp user.debug Legato:  DBUG | _UNKNOWN_[6771]/framework T=main | LE_FILENAME InitPool() 295 | Memory pool name 'framework.hashMap_MessagingServices' is truncated to 'framework.hashMap_MessagingServ'
Oct 27 13:46:47 swi-mdm9x28-wp user.debug Legato:  DBUG | _UNKNOWN_[6771]/framework T=main | LE_FILENAME InitPool() 295 | Memory pool name 'framework.hashMap_MessagingClients' is truncated to 'framework.hashMap_MessagingClie'
Oct 27 13:46:47 swi-mdm9x28-wp user.debug Legato:  DBUG | _UNKNOWN_[6771]/framework T=main | LE_FILENAME InitPool() 295 | Memory pool name 'framework.PipelineSIGCHLD-reports' is truncated to 'framework.PipelineSIGCHLD-repor'
Oct 27 13:46:47 swi-mdm9x28-wp user.debug Legato:  DBUG | _UNKNOWN_[6771]/framework T=main | LE_FILENAME fs_Init() 840 | FS prefix path "/data/le_fs/"
Oct 27 13:46:47 swi-mdm9x28-wp user.debug Legato:  DBUG | _UNKNOWN_[6771]/framework T=main | LE_FILENAME InitPool() 295 | Memory pool name 'framework.hashMap_refFsFileRefMap' is truncated to 'framework.hashMap_refFsFileRefM'
Oct 27 13:46:47 swi-mdm9x28-wp user.debug Legato:  DBUG | _UNKNOWN_[6771]/framework T=main | LE_FILENAME rand_Init() 71 | getrandom function: 0xb6d61150
Oct 27 13:46:47 swi-mdm9x28-wp user.debug Legato:  DBUG | _UNKNOWN_[6771]/framework T=main | LE_FILENAME le_mem_ForceAlloc() 833 | Memory pool 'framework.DestructorObjs' overflowed. Expanded to 1 blocks.
Oct 27 13:46:47 swi-mdm9x28-wp user.debug Legato:  DBUG | _UNKNOWN_[6771]/<invalid> T=main | _componentMain.c _pipesSendComponent_Init() 26 | Initializing pipesSendComponent component library.
Oct 27 13:46:47 swi-mdm9x28-wp user.debug Legato:  DBUG | pipesSend[6771]/framework T=main | LE_FILENAME InitPool() 295 | Memory pool name 'framework.msgs-LogControlProtocol' is truncated to 'framework.msgs-LogControlProtoc'
Oct 27 13:46:47 swi-mdm9x28-wp user.debug Legato:  DBUG | pipesSend[6771]/framework T=main | LE_FILENAME le_mem_ForceAlloc() 833 | Memory pool 'framework.SigMonitor' overflowed. Expanded to 1 blocks.
Oct 27 13:46:47 swi-mdm9x28-wp user.debug Legato:  DBUG | pipesSend[6771]/framework T=main | LE_FILENAME le_mem_ForceAlloc() 833 | Memory pool 'framework.SigHandler' overflowed. Expanded to 1 blocks.
Oct 27 13:46:47 swi-mdm9x28-wp user.debug Legato:  DBUG | pipesSend[6771]/pipesSend_exe T=main | _main.c main() 60 | == Starting Event Processing Loop ==
Oct 27 13:46:47 swi-mdm9x28-wp user.info Legato:  INFO | pipesSend[6771]/pipesSendComponent T=main | send.c _pipesSendComponent_COMPONENT_INIT() 19 | #####Inside send COMPONENT_INIT.#####
Oct 27 13:46:47 swi-mdm9x28-wp user.info Legato:  INFO | pipesSend[6771]/pipesSendComponent T=main | send.c main() 27 | ##### SEND Just opened the fifo.##### -1
Oct 27 14:46:47 swi-mdm9x28-wp user.info Legato:  INFO | pipesSend[6771] | fd ==1
Oct 27 13:46:47 swi-mdm9x28-wp user.info Legato:  INFO | pipesSend[6771]/pipesSendComponent T=main | send.c main() 31 | ##### SEND: opening the fifo has failed.#####
Oct 27 14:46:47 swi-mdm9x28-wp user.notice kernel: [ 2880.270866] audit: type=1400 audit(1603806407.102:9): lsm=SMACK fn=smack_inode_getattr action=denied subject="app.pipesSend" object="admin" requested=r pid=6771 comm="pipesSend" path="pipe:[24224]" dev="pipefs" ino=24224

So, it looks like the fifo cannot be opened.

root@swi-mdm9x28-wp:~# ls -l
prwxrwxrwx    1 root     root             0 Oct 27 10:44 fifo

Any ideas what the catch is?

It looks like you have a SMACK access problem with the fifo. In addition to the usual Linux permissions, you need to do something like:

xattr set ‘security.SMACK64’ ‘app.pipesSendrwx’ ‘fifo’

Thanks for the hint.

I did was you suggested:

root@swi-mdm9x28-wp:~# xattr set 'security.SMACK64' 'app.pipesSendrwx' 'fifo'
root@swi-mdm9x28-wp:~# xattr get fifo
                       name=security.SMACK64; value=app.pipesSendrwx

My send.adef file looks like this:

executables:
{
    pipesSend = ( pipesSendComponent )
}

start: manual

processes:
{
    envVars:
    {
        LE_LOG_LEVEL = DEBUG
    }

    run:
    {
        ( pipesSend )
    }
}

And this is my Component.cdef file:

sources:
{
    send.c
}

Oct 27 15:55:33 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c app_Start() 3420 | Starting app 'pipesSend'
Oct 27 15:55:33 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link '/dev/log' to '/legato/systems/current/appsWriteable/pipesSend/dev/log': Already exists
Oct 27 15:55:33 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link '/dev/null' to '/legato/systems/current/appsWriteable/pipesSend/dev/null': Already exists
Oct 27 15:55:33 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link '/dev/zero' to '/legato/systems/current/appsWriteable/pipesSend/dev/zero': Already exists
Oct 27 15:55:33 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link '/legato/systems/current/lib/liblegato.so' to '/legato/systems/current/appsWriteable/pipesSend/lib/liblegato.so': Already exists
Oct 27 15:55:33 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link '/lib/ld-linux.so.3' to '/legato/systems/current/appsWriteable/pipesSend/lib/ld-linux.so.3': Already exists
Oct 27 15:55:33 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link '/lib/libc.so.6' to '/legato/systems/current/appsWriteable/pipesSend/lib/libc.so.6': Already exists
Oct 27 15:55:33 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link '/lib/libpthread.so.0' to '/legato/systems/current/appsWriteable/pipesSend/lib/libpthread.so.0': Already exists
Oct 27 15:55:33 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link '/lib/librt.so.1' to '/legato/systems/current/appsWriteable/pipesSend/lib/librt.so.1': Already exists
Oct 27 15:55:33 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link '/lib/libdl.so.2' to '/legato/systems/current/appsWriteable/pipesSend/lib/libdl.so.2': Already exists
Oct 27 15:55:33 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link '/lib/libgcc_s.so.1' to '/legato/systems/current/appsWriteable/pipesSend/lib/libgcc_s.so.1': Already exists
Oct 27 15:55:33 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link '/lib/libm.so.6' to '/legato/systems/current/appsWriteable/pipesSend/lib/libm.so.6': Already exists
Oct 27 15:55:33 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link '/usr/lib/libstdc++.so.6' to '/legato/systems/current/appsWriteable/pipesSend/lib/libstdc++.so.6': Already exists
Oct 27 15:55:33 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link '/legato/systems/current/apps/pipesSend/read-only/lib/libComponent_pipesSendComponent.so' to '/legato/systems/current/appsWriteable/pi
Oct 27 15:55:33 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link '/legato/systems/current/apps/pipesSend/read-only/bin/pipesSend' to '/legato/systems/current/appsWriteable/pipesSend/bin/pipesSend': A
Oct 27 15:55:33 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateTmpFs() 1738 | Mounted tmpfs at /legato/systems/current/appsWriteable/pipesSend/tmp.
Oct 27 15:55:33 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2104 | Created file link '/tmp/legato/serviceDirectoryServer' to '/legato/systems/current/appsWriteable/pipesSend/tmp/legato/serviceDirectoryServer'.
Oct 27 15:55:33 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2104 | Created file link '/tmp/legato/serviceDirectoryClient' to '/legato/systems/current/appsWriteable/pipesSend/tmp/legato/serviceDirectoryClient'.
Oct 27 15:55:33 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxCoreDumpFileBytes to value 102400.
Oct 27 15:55:33 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxFileBytes to value 102400.
Oct 27 15:55:33 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxLockedMemoryBytes to value 8192.
Oct 27 15:55:33 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxFileDescriptors to value 256.
Oct 27 15:55:33 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxMQueueBytes to value 512.
Oct 27 15:55:33 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxThreads to value 20.
Oct 27 15:55:33 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxQueuedSignals to value 100.
Oct 27 15:55:33 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | proc.c proc_Start() 1390 | Starting process 'pipesSend' with pid 14831
Oct 27 15:55:33 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[14831]/supervisor T=main | proc.c proc_Start() 1355 | Execing 'pipesSend'
Oct 27 14:55:33 swi-mdm9x28-wp user.debug Legato:  DBUG | _UNKNOWN_[14831]/framework T=unknown | LE_FILENAME InitPool() 295 | Memory pool name 'framework.hashMap_refPathIteratorMap' is truncated to 'framework.hashMap_refPathIterat'
Oct 27 14:55:33 swi-mdm9x28-wp user.debug Legato:  DBUG | _UNKNOWN_[14831]/framework T=main | LE_FILENAME InitPool() 295 | Memory pool name 'framework.hashMap_refEventHandlers' is truncated to 'framework.hashMap_refEventHandl'
Oct 27 14:55:33 swi-mdm9x28-wp user.debug Legato:  DBUG | _UNKNOWN_[14831]/framework T=main | LE_FILENAME InitPool() 295 | Memory pool name 'framework.hashMap_refDefault Timer SafeRe' is truncated to 'framework.hashMap_refDefault Ti'
Oct 27 14:55:33 swi-mdm9x28-wp user.debug Legato:  DBUG | _UNKNOWN_[14831]/framework T=main | LE_FILENAME InitPool() 295 | Memory pool name 'framework.MessagingClientInterfaces' is truncated to 'framework.MessagingClientInterf'
Oct 27 14:55:33 swi-mdm9x28-wp user.debug Legato:  DBUG | _UNKNOWN_[14831]/framework T=main | LE_FILENAME InitPool() 295 | Memory pool name 'framework.hashMap_refHandlersRef' is truncated to 'framework.hashMap_refHandlersRe'
Oct 27 14:55:33 swi-mdm9x28-wp user.debug Legato:  DBUG | _UNKNOWN_[14831]/framework T=main | LE_FILENAME InitPool() 295 | Memory pool name 'framework.hashMap_MessagingServices' is truncated to 'framework.hashMap_MessagingServ'
Oct 27 14:55:33 swi-mdm9x28-wp user.debug Legato:  DBUG | _UNKNOWN_[14831]/framework T=main | LE_FILENAME InitPool() 295 | Memory pool name 'framework.hashMap_MessagingClients' is truncated to 'framework.hashMap_MessagingClie'
Oct 27 14:55:33 swi-mdm9x28-wp user.debug Legato:  DBUG | _UNKNOWN_[14831]/framework T=main | LE_FILENAME InitPool() 295 | Memory pool name 'framework.PipelineSIGCHLD-reports' is truncated to 'framework.PipelineSIGCHLD-repor'
Oct 27 14:55:33 swi-mdm9x28-wp user.debug Legato:  DBUG | _UNKNOWN_[14831]/framework T=main | LE_FILENAME fs_Init() 840 | FS prefix path "/data/le_fs/"
Oct 27 14:55:33 swi-mdm9x28-wp user.debug Legato:  DBUG | _UNKNOWN_[14831]/framework T=main | LE_FILENAME InitPool() 295 | Memory pool name 'framework.hashMap_refFsFileRefMap' is truncated to 'framework.hashMap_refFsFileRefM'
Oct 27 14:55:33 swi-mdm9x28-wp user.debug Legato:  DBUG | _UNKNOWN_[14831]/framework T=main | LE_FILENAME rand_Init() 71 | getrandom function: 0xb6d04150
Oct 27 14:55:33 swi-mdm9x28-wp user.debug Legato:  DBUG | _UNKNOWN_[14831]/framework T=main | LE_FILENAME le_mem_ForceAlloc() 833 | Memory pool 'framework.DestructorObjs' overflowed. Expanded to 1 blocks.
Oct 27 14:55:33 swi-mdm9x28-wp user.debug Legato:  DBUG | _UNKNOWN_[14831]/<invalid> T=main | _componentMain.c _pipesSendComponent_Init() 26 | Initializing pipesSendComponent component library.
Oct 27 14:55:33 swi-mdm9x28-wp user.debug Legato:  DBUG | pipesSend[14831]/framework T=main | LE_FILENAME InitPool() 295 | Memory pool name 'framework.msgs-LogControlProtocol' is truncated to 'framework.msgs-LogControlProtoc'
Oct 27 14:55:33 swi-mdm9x28-wp user.debug Legato:  DBUG | pipesSend[14831]/framework T=main | LE_FILENAME le_mem_ForceAlloc() 833 | Memory pool 'framework.SigMonitor' overflowed. Expanded to 1 blocks.
Oct 27 14:55:33 swi-mdm9x28-wp user.debug Legato:  DBUG | pipesSend[14831]/framework T=main | LE_FILENAME le_mem_ForceAlloc() 833 | Memory pool 'framework.SigHandler' overflowed. Expanded to 1 blocks.
Oct 27 14:55:33 swi-mdm9x28-wp user.debug Legato:  DBUG | pipesSend[14831]/pipesSend_exe T=main | _main.c main() 60 | == Starting Event Processing Loop ==
Oct 27 14:55:33 swi-mdm9x28-wp user.info Legato:  INFO | pipesSend[14831]/pipesSendComponent T=main | send.c _pipesSendComponent_COMPONENT_INIT() 19 | #####Inside send COMPONENT_INIT.#####
Oct 27 14:55:33 swi-mdm9x28-wp user.info Legato:  INFO | pipesSend[14831]/pipesSendComponent T=main | send.c main() 27 | ##### SEND Just opened the fifo.##### -1
Oct 27 15:55:33 swi-mdm9x28-wp user.info Legato:  INFO | pipesSend[14831] | fd ==1
Oct 27 14:55:33 swi-mdm9x28-wp user.info Legato:  INFO | pipesSend[14831]/pipesSendComponent T=main | send.c main() 31 | ##### SEND: opening the fifo has failed.#####
Oct 27 15:55:33 swi-mdm9x28-wp user.notice kernel: [ 7006.708414] audit: type=1400 audit(1603810533.532:15): lsm=SMACK fn=smack_inode_getattr action=denied subject="app.pipesSend" object="admin" requested=r pid=14831 comm="pipesSend" path="pipe:[47207]" dev="pipefs" ino=47207
Oct 27 15:57:30 swi-mdm9x28-wp user.info Legato:  INFO | dcsDaemon[873]/dcsCellular T=main | dcsCellular.c DcsCellularPacketSwitchHandler() 673 | Packet switch state: previous 1, new 0
Oct 27 15:57:30 swi-mdm9x28-wp user.info Legato:  INFO | dcsDaemon[873]/dcs T=main | dcs_db.c le_dcs_EventNotifierTechStateTransition() 341 | Notify all channels of technology 2 of system state transition to down
Oct 27 15:57:30 swi-mdm9x28-wp user.info Legato:  INFO | dcsDaemon[873]/dcsCellular T=main | dcsCellular.c DcsCellularPacketSwitchHandler() 673 | Packet switch state: previous 0, new 1
Oct 27 15:57:30 swi-mdm9x28-wp user.info Legato:  INFO | dcsDaemon[873]/dcs T=main | dcs_db.c le_dcs_EventNotifierTechStateTransition() 341 | Notify all channels of technology 2 of system state transition to up

You can’t use absolute path in a sandboxed application. Try putting “sandboxed: false” in your adef, you can then use absolute paths. After you get it working you can go back to sandboxed, you will use the file name as just “fifo” and you will need to add a directory assignment for /home/root in your .adef .

I just changed the adef files like so:

executables:
{
    pipesSend = ( pipesSendComponent )
}

start: manual

requires:
{
    file:
   {
        [rw] /home/root/ 
   }
}

processes:
{
    envVars:
    {
        LE_LOG_LEVEL = DEBUG
    }

    run:
    {
        ( pipesSend )
    }
}

executables:
{
    pipesRecv = ( pipesRecvComponent )
}

start: manual

requires:
{
    file:{

        [rw] /home/root/ 
   }
}

processes:
{
    envVars:
    {
        LE_LOG_LEVEL = DEBUG
    }

    run:
    {
        ( pipesRecv )
    }
}

This is what both .c files look like with regard to the open function:

int fd = open("fifo", O_WRONLY);   // send.c

int fd = open("fifo", O_RDONLY);   // recv.c

Oct 28 12:48:00 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c app_Create() 3207 | Creating app 'pipesSend'
Oct 28 12:48:00 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | proc.c GetFaultAction() 323 | No fault action specified for process 'pipesSend'. Assuming 'ignore'.
Oct 28 12:48:00 swi-mdm9x28-wp user.warn Legato: -WRN- | supervisor[833]/supervisor T=main | proc.c GetWatchdogAction() 359 | pipesSend watchdogAction '' in proc section
Oct 28 12:48:00 swi-mdm9x28-wp user.warn Legato: -WRN- | supervisor[833]/supervisor T=main | proc.c GetWatchdogAction() 359 | pipesSend watchdogAction '' in proc section
Oct 28 12:48:00 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c app_Start() 3420 | Starting app 'pipesSend'
Oct 28 12:48:00 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2104 | Created file link '/dev/log' to '/legato/systems/current/appsWriteable/pipesSend/dev/log'.
Oct 28 12:48:00 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2104 | Created file link '/dev/null' to '/legato/systems/current/appsWriteable/pipesSend/dev/null'.
Oct 28 12:48:00 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2104 | Created file link '/dev/zero' to '/legato/systems/current/appsWriteable/pipesSend/dev/zero'.
Oct 28 12:48:00 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2104 | Created file link '/legato/systems/current/lib/liblegato.so' to '/legato/systems/current/appsWriteable/pipesSend/lib/liblegato.so'.
Oct 28 12:48:00 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2104 | Created file link '/lib/ld-linux.so.3' to '/legato/systems/current/appsWriteable/pipesSend/lib/ld-linux.so.3'.
Oct 28 12:48:00 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2104 | Created file link '/lib/libc.so.6' to '/legato/systems/current/appsWriteable/pipesSend/lib/libc.so.6'.
Oct 28 12:48:00 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2104 | Created file link '/lib/libpthread.so.0' to '/legato/systems/current/appsWriteable/pipesSend/lib/libpthread.so.0'.
Oct 28 12:48:00 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2104 | Created file link '/lib/librt.so.1' to '/legato/systems/current/appsWriteable/pipesSend/lib/librt.so.1'.
Oct 28 12:48:00 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2104 | Created file link '/lib/libdl.so.2' to '/legato/systems/current/appsWriteable/pipesSend/lib/libdl.so.2'.
Oct 28 12:48:00 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2104 | Created file link '/lib/libgcc_s.so.1' to '/legato/systems/current/appsWriteable/pipesSend/lib/libgcc_s.so.1'.
Oct 28 12:48:00 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2104 | Created file link '/lib/libm.so.6' to '/legato/systems/current/appsWriteable/pipesSend/lib/libm.so.6'.
Oct 28 12:48:00 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2104 | Created file link '/usr/lib/libstdc++.so.6' to '/legato/systems/current/appsWriteable/pipesSend/lib/libstdc++.so.6'.
Oct 28 12:48:00 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2104 | Created file link '/legato/systems/current/apps/pipesSend/read-only/lib/libComponent_pipesSendComponent.so' to '/legato/systems/current/appsWriteable/pip
Oct 28 12:48:00 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2104 | Created file link '/legato/systems/current/apps/pipesSend/read-only/bin/pipesSend' to '/legato/systems/current/appsWriteable/pipesSend/bin/pipesSend'.
Oct 28 12:48:01 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateTmpFs() 1738 | Mounted tmpfs at /legato/systems/current/appsWriteable/pipesSend/tmp.
Oct 28 12:48:01 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2104 | Created file link '/tmp/legato/serviceDirectoryServer' to '/legato/systems/current/appsWriteable/pipesSend/tmp/legato/serviceDirectoryServer'.
Oct 28 12:48:01 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | app.c CreateFileLink() 2104 | Created file link '/tmp/legato/serviceDirectoryClient' to '/legato/systems/current/appsWriteable/pipesSend/tmp/legato/serviceDirectoryClient'.
Oct 28 12:48:01 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxCoreDumpFileBytes to value 102400.
Oct 28 12:48:01 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxFileBytes to value 102400.
Oct 28 12:48:01 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxLockedMemoryBytes to value 8192.
Oct 28 12:48:01 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxFileDescriptors to value 256.
Oct 28 12:48:01 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxMQueueBytes to value 512.
Oct 28 12:48:01 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxThreads to value 20.
Oct 28 12:48:01 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxQueuedSignals to value 100.
Oct 28 12:48:01 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[833]/supervisor T=main | proc.c proc_Start() 1390 | Starting process 'pipesSend' with pid 25289
Oct 28 12:48:01 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[25289]/supervisor T=main | proc.c proc_Start() 1355 | Execing 'pipesSend'
Oct 28 11:48:01 swi-mdm9x28-wp user.debug Legato:  DBUG | _UNKNOWN_[25289]/framework T=unknown | LE_FILENAME InitPool() 295 | Memory pool name 'framework.hashMap_refPathIteratorMap' is truncated to 'framework.hashMap_refPathIterat'
Oct 28 11:48:01 swi-mdm9x28-wp user.debug Legato:  DBUG | _UNKNOWN_[25289]/framework T=main | LE_FILENAME InitPool() 295 | Memory pool name 'framework.hashMap_refEventHandlers' is truncated to 'framework.hashMap_refEventHandl'
Oct 28 11:48:01 swi-mdm9x28-wp user.debug Legato:  DBUG | _UNKNOWN_[25289]/framework T=main | LE_FILENAME InitPool() 295 | Memory pool name 'framework.hashMap_refDefault Timer SafeRe' is truncated to 'framework.hashMap_refDefault Ti'
Oct 28 11:48:01 swi-mdm9x28-wp user.debug Legato:  DBUG | _UNKNOWN_[25289]/framework T=main | LE_FILENAME InitPool() 295 | Memory pool name 'framework.MessagingClientInterfaces' is truncated to 'framework.MessagingClientInterf'
Oct 28 11:48:01 swi-mdm9x28-wp user.debug Legato:  DBUG | _UNKNOWN_[25289]/framework T=main | LE_FILENAME InitPool() 295 | Memory pool name 'framework.hashMap_refHandlersRef' is truncated to 'framework.hashMap_refHandlersRe'
Oct 28 11:48:01 swi-mdm9x28-wp user.debug Legato:  DBUG | _UNKNOWN_[25289]/framework T=main | LE_FILENAME InitPool() 295 | Memory pool name 'framework.hashMap_MessagingServices' is truncated to 'framework.hashMap_MessagingServ'
Oct 28 11:48:01 swi-mdm9x28-wp user.debug Legato:  DBUG | _UNKNOWN_[25289]/framework T=main | LE_FILENAME InitPool() 295 | Memory pool name 'framework.hashMap_MessagingClients' is truncated to 'framework.hashMap_MessagingClie'
Oct 28 11:48:01 swi-mdm9x28-wp user.debug Legato:  DBUG | _UNKNOWN_[25289]/framework T=main | LE_FILENAME InitPool() 295 | Memory pool name 'framework.PipelineSIGCHLD-reports' is truncated to 'framework.PipelineSIGCHLD-repor'
Oct 28 11:48:01 swi-mdm9x28-wp user.debug Legato:  DBUG | _UNKNOWN_[25289]/framework T=main | LE_FILENAME fs_Init() 840 | FS prefix path "/data/le_fs/"
Oct 28 11:48:01 swi-mdm9x28-wp user.debug Legato:  DBUG | _UNKNOWN_[25289]/framework T=main | LE_FILENAME InitPool() 295 | Memory pool name 'framework.hashMap_refFsFileRefMap' is truncated to 'framework.hashMap_refFsFileRefM'
Oct 28 11:48:01 swi-mdm9x28-wp user.debug Legato:  DBUG | _UNKNOWN_[25289]/framework T=main | LE_FILENAME rand_Init() 71 | getrandom function: 0xb6d17150
Oct 28 11:48:01 swi-mdm9x28-wp user.debug Legato:  DBUG | _UNKNOWN_[25289]/framework T=main | LE_FILENAME le_mem_ForceAlloc() 833 | Memory pool 'framework.DestructorObjs' overflowed. Expanded to 1 blocks.
Oct 28 11:48:01 swi-mdm9x28-wp user.debug Legato:  DBUG | _UNKNOWN_[25289]/<invalid> T=main | _componentMain.c _pipesSendComponent_Init() 26 | Initializing pipesSendComponent component library.
Oct 28 11:48:01 swi-mdm9x28-wp user.debug Legato:  DBUG | pipesSend[25289]/framework T=main | LE_FILENAME InitPool() 295 | Memory pool name 'framework.msgs-LogControlProtocol' is truncated to 'framework.msgs-LogControlProtoc'
Oct 28 11:48:01 swi-mdm9x28-wp user.debug Legato:  DBUG | pipesSend[25289]/framework T=main | LE_FILENAME le_mem_ForceAlloc() 833 | Memory pool 'framework.SigMonitor' overflowed. Expanded to 1 blocks.
Oct 28 11:48:01 swi-mdm9x28-wp user.debug Legato:  DBUG | pipesSend[25289]/framework T=main | LE_FILENAME le_mem_ForceAlloc() 833 | Memory pool 'framework.SigHandler' overflowed. Expanded to 1 blocks.
Oct 28 11:48:01 swi-mdm9x28-wp user.debug Legato:  DBUG | pipesSend[25289]/pipesSend_exe T=main | _main.c main() 60 | == Starting Event Processing Loop ==
Oct 28 11:48:01 swi-mdm9x28-wp user.info Legato:  INFO | pipesSend[25289]/pipesSendComponent T=main | send.c _pipesSendComponent_COMPONENT_INIT() 19 | #####Inside send COMPONENT_INIT.#####
Oct 28 11:48:01 swi-mdm9x28-wp user.info Legato:  INFO | pipesSend[25289]/pipesSendComponent T=main | send.c main() 27 | ##### SEND Just opened the fifo.##### -1
Oct 28 12:48:01 swi-mdm9x28-wp user.info Legato:  INFO | pipesSend[25289] | fd ==1
Oct 28 11:48:01 swi-mdm9x28-wp user.info Legato:  INFO | pipesSend[25289]/pipesSendComponent T=main | send.c main() 31 | ##### SEND: opening the fifo has failed.#####
Oct 28 12:48:01 swi-mdm9x28-wp user.notice kernel: [13250.605730] audit: type=1400 audit(1603885681.051:5): lsm=SMACK fn=smack_inode_getattr action=denied subject="app.pipesSend" object="admin" requested=r pid=25289 comm="pipesSend" path="pipe:[78040]" dev="pipefs" ino=78040

You might also need to set the smack permission on the /home/root directory.

Also if you get an open fail you could try printing strerror(errno) which is a message describing the error.

Don’t I have to do the same thing for pipesRecv?

xattr set 'security.SMACK64' 'app.pipesRecvrwx' 'fifo'

But to me it seems like each file can only have one value as it changed after running the command above.

name=security.SMACK64; value=app.pipesRecvrwx

Feel free to correct me if I’m wrong.

How exactly do I set smack permissions on the /home/root/ directory?

I just added a proper error printing and missing permissions indeed seem to be the problem.

Nov 10 13:03:35 swi-mdm9x28-wp user.info Legato:  INFO | pipesSend[24024]/pipesSendComponent T=main | send.c _pipesSendComponent_COMPONENT_INIT() 19 | #####Inside send COMPONENT_INIT.#####
Nov 10 13:03:35 swi-mdm9x28-wp user.info Legato:  INFO | pipesSend[24024]/pipesSendComponent T=main | send.c main() 27 | ##### SEND Just opened the fifo.##### -1
Nov 10 13:03:35 swi-mdm9x28-wp user.info Legato:  INFO | pipesSend[24024]/pipesSendComponent T=main | send.c main() 31 | ##### Error opening fd: Permission denied
Nov 10 13:03:35 swi-mdm9x28-wp user.info Legato:  INFO | pipesSend[24024]/pipesSendComponent T=main | send.c main() 32 | ##### SEND: opening the fifo has failed.#####
Nov 10 14:03:35 swi-mdm9x28-wp user.notice kernel: [12801.920348] audit: type=1400 audit(1605013415.402:5): lsm=SMACK fn=smack_inode_getattr action=denied subject="app.pipesSend" object="admin" requested=r pid=24024 comm="pipesSend" path="pipe:[76071]" dev="pipefs" ino=76071

Our Python script creates the pipe, apparently it does not need to set SMACK permissions to access the pipe after this. Note the Python script runs from root. SMACK permissions on the pipe are set by the Python script for the Legato application which runs sandboxed.

It appears to me that SMACK permissions would be needed on the directory if the pipe is created by a sandboxed application.