Recent

Author Topic: Restart Application not working in Linux mint  (Read 1783 times)

tr_escape

  • Sr. Member
  • ****
  • Posts: 432
  • sector name toys | respect to spectre
    • Github:
Restart Application not working in Linux mint
« on: December 21, 2014, 06:50:01 pm »
Hello everyone,

I copied a function for restarting my application in the linux mint from this forum.
In the windows it is working but in linux mint not working.

Is there any idea?

Code: [Select]
procedure TfrmMain.RestartApp;
VAR aProcess : TProcess;
begin
  aProcess := TProcess.Create(nil);
  aProcess.CommandLine := Application.ExeName;
  aProcess.Execute;
  aProcess.Free;
  Application.Terminate;
end;

Thanks a lot

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11459
  • FPC developer.
Re: Restart Application not working in Linux mint
« Reply #1 on: December 21, 2014, 07:14:25 pm »
Probably Exename doesn't contain path, and *nix doesn't look in the working directory without shell.


 

TinyPortal © 2005-2018