Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2015-02

simpleipc under Linux

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mattias Gaertner

Hi,

SimpleIPC under Linux always creates the pipe file under /tmp/.

packages/fcl-process/src/unix/simpleipc.inc

constructor TPipeClientComm.Create(AOWner: TSimpleIPCClient);
Var
  D : String;
begin
  inherited Create(AOWner);
  FFileName:=Owner.ServerID;
  If (Owner.ServerInstance'') then
    FFileName:=FFileName+'-'+Owner.ServerInstance;
  D:='/tmp/'; // Change to something better later
  FFileName:=D+FFileName;
end;

Can this be made optional, for example to this:

constructor TPipeClientComm.Create(AOWner: TSimpleIPCClient);
begin
  inherited Create(AOWner);
  FFileName:=Owner.ServerID;
  If (Owner.ServerInstance'') then
    FFileName:=FFileName+'-'+Owner.ServerInstance;
  if FFileName[1]'/' then
    FFileName:='/tmp/'+FFileName;
end;

Should I create a mantis issue?

Mattias

Reply by email

Michael Van Canneyt
to Mattias Gaertner
Mattias Gaertner wrote 35 lines
Hi, SimpleIPC under Linux always creates the pipe file under /tmp/. packages/fcl-process/src/unix/simpleipc.inc constructor TPipeClientComm.Create(AOWner: TSimpleIPCClient); Var D : String; begin inherited Create(AOWner); FFileName:=Owner.ServerID; If (Owner.ServerInstance'') then FFileName:=FFileName+'-'+Owner.ServerInstance; D:='/tmp/'; // Change to something better later FFileName:=D+FFileName; end; Can this be made optional, for example to this: constructor TPipeClientComm.Create(AOWner: TSimpleIPCClient); begin inherited Create(AOWner); FFileName:=Owner.ServerID; If (Owner.ServerInstance'') then FFileName:=FFileName+'-'+Owner.ServerInstance; if FFileName[1]'/' then FFileName:='/tmp/'+FFileName; end; Should I create a mantis issue?

Yes.
I planned in fact 2 modes: global, and local. Local was meant to be user-specific.

Since then I think using d-bus is the better approach. I have components that enable communication through d-bus. You can't find a linux box without it anyway (don't know about BSDs or Darwin)

Michael.

Reply by email