View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002607 | Double Commander | File operations | public | 2021-02-18 16:48 | 2021-05-24 14:37 |
| Reporter | bbt | Assigned To | Alexx2000 | ||
| Priority | normal | Severity | crash | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Projection | none | ETA | none | ||
| Product Version | 1.0.0 (trunk) | ||||
| Target Version | 1.0.0 | Fixed in Version | 1.0.0 | ||
| Summary | 0002607: Named pipes creation error in FreeBSD | ||||
| Description | Double Commander crashes at launch in FreeBSD if temp directory exists (for example if you try to open a second instance): [FORMS.PP] ExceptionOccurred Sender=EIPCError Exception=Failed to create named pipe: /tmp/doublecmd-1001/doublecmd.pipe I think the current code in upipeserver.pas is correct only for MacOS, the rest of the BSD family should use Xdg as Linux does. I have attached a patch with the fix. Tested only under FreeBSD. | ||||
| Steps To Reproduce | 1. Launch first instance of Double Commander. 2. Without deleting the temporary directory (/tmp/doublecmd-1001), launch a second instance of Double Commander. The second instance will fail with an unhandled exception. Does not matter if first instance is running still or not. | ||||
| Tags | No tags attached. | ||||
| Attached Files | upipeserver.patch (1,190 bytes)
Index: src/platform/unix/upipeserver.pas
===================================================================
--- src/platform/unix/upipeserver.pas (revision 9666)
+++ src/platform/unix/upipeserver.pas (working copy)
@@ -32,7 +32,7 @@
uses
SimpleIPC, BaseUnix, uPollThread
-{$IF DEFINED(LINUX)}
+{$IF NOT DEFINED(DARWIN)}
, uXdg
{$ENDIF}
;
@@ -65,7 +65,7 @@
function GetPipeFileName(const FileName: String; Global : Boolean): String;
begin
-{$IF DEFINED(LINUX)}
+{$IF NOT DEFINED(DARWIN)}
Result:= IncludeTrailingBackslash(GetUserRuntimeDir) + FileName;
{$ELSE}
Result:= GetTempDir(Global) + ApplicationName + '-' + IntToStr(fpGetUID) + PathDelim + FileName;
@@ -89,7 +89,7 @@
end;
constructor TPipeServerComm.Create(AOWner: TSimpleIPCServer);
-{$IF NOT DEFINED(LINUX)}
+{$IF DEFINED(DARWIN)}
var
Info: TStat;
Directory: String;
@@ -101,7 +101,7 @@
FFileName:= FFileName + '-' + IntToStr(fpGetPID);
if FFileName[1] <> '/' then
FFileName:= GetPipeFileName(FFileName, Owner.Global);
-{$IF NOT DEFINED(LINUX)}
+{$IF DEFINED(DARWIN)}
// Verify directory owner
Directory:= ExtractFileDir(FFileName);
if not DirectoryExists(Directory) then
| ||||
| Fixed in Revision | 9793 | ||||
| Operating system | BSD | ||||
| Widgetset | |||||
| Architecture | |||||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2021-02-18 16:48 | bbt | New Issue | |
| 2021-02-18 16:48 | bbt | File Added: upipeserver.patch | |
| 2021-03-22 14:01 | Alexx2000 | Status | new => acknowledged |
| 2021-03-22 14:01 | Alexx2000 | Target Version | => 1.0.0 |
| 2021-05-24 14:37 | Alexx2000 | Fixed in Revision | => 9793 |
| 2021-05-24 14:37 | Alexx2000 | Status | acknowledged => resolved |
| 2021-05-24 14:37 | Alexx2000 | Fixed in Version | => 1.0.0 |
| 2021-05-24 14:37 | Alexx2000 | Resolution | open => fixed |
| 2021-05-24 14:37 | Alexx2000 | Assigned To | => Alexx2000 |