Recent

Author Topic: IPC caused EIPC error on Linux  (Read 572 times)

Borneq

  • Full Member
  • ***
  • Posts: 238
IPC caused EIPC error on Linux
« on: January 20, 2020, 10:51:44 pm »
I am writing editor which must have only one instance. I use component in fast way.
I attach minimal example.
This component uses IPC, it correct work in Windows, but now in Linux is error:
EIPC error
Failed to create named pipe /tmp/yuniqueinstance_/<path to example>

I think, problem is with path separator? must be replaced?

Borneq

  • Full Member
  • ***
  • Posts: 238
Re: IPC caused EIPC error on Linux
« Reply #1 on: January 22, 2020, 04:55:19 pm »
Problem is with "/" in IPCClient.ServerId := GetServerId(FIdentifier)
I will replce "/" with "_"
Code: Pascal  [Select]
  1.   if FileNameCaseSensitive then
  2.     UniqueInstance1.Identifier:=ParamStr(0)
  3.   else
  4.     UniqueInstance1.Identifier:=LowerCase(ParamStr(0));
  5.   UniqueInstance1.Identifier:=StringReplace(UniqueInstance1.Identifier,'/','_',[rfReplaceAll]);
  6.  
« Last Edit: January 22, 2020, 05:04:12 pm by Borneq »

zamronypj

  • Jr. Member
  • **
  • Posts: 57
    • Fano Framework, Free Pascal web application framework
Re: IPC caused EIPC error on Linux
« Reply #2 on: January 23, 2020, 04:06:51 am »
Not sure why, but maybe  you should check if directory exists and that application has proper permission to write to that directory.
Fano Framework, Free Pascal web application framework https://fanoframework.github.io
Personal Projects https://v3.juhara.com
Github https://github.com/zamronypj