Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,6 @@ $RECYCLE.BIN/
Network Trash Folder
Temporary Items
.apdisk

backup/
lib/
5 changes: 3 additions & 2 deletions lazsynaser.pas
Original file line number Diff line number Diff line change
Expand Up @@ -2297,16 +2297,17 @@ function TBlockSerial.cpomComportAccessible: boolean;
exit; // done.
end;
// Is port owned by orphan? Then it's time for error recovery.
//FPC forgot to add getsid.. :-(
{$IFNDEF FPC}
if Libc.getsid(ReadLockfile) = -1 then
{$ELSE}
if FpGetSid(ReadLockfile) = -1 then
{$ENDIF}
begin // Lockfile was left from former desaster
DeleteFile(Filename); // error recovery
CreateLockfile(MyPid);
result := true;
exit;
end;
{$ENDIF}
result := false // Sorry, port is owned by living PID and locked
end;

Expand Down