Recent

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

Borneq

  • Full Member
  • ***
  • Posts: 248
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: 248
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

  • Full Member
  • ***
  • Posts: 133
    • 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
Apache module executes Pascal program like scripting language https://zamronypj.github.io/mod_pascal/
Github https://github.com/zamronypj

 

TinyPortal © 2005-2018