Page MenuHomeFreeBSD

devel/qt5-core: Add a patch that fixes QLockFilePrivate::processNameByPid() function to return non-truncated name.
ClosedPublic

Authored by arrowd on Jun 6 2018, 10:02 AM.
Tags
None
Referenced Files
F81662833: D15673.diff
Fri, Apr 19, 3:33 PM
Unknown Object (File)
Thu, Mar 28, 4:08 PM
Unknown Object (File)
Thu, Mar 28, 9:54 AM
Unknown Object (File)
Mar 10 2024, 5:26 AM
Unknown Object (File)
Feb 20 2024, 6:16 AM
Unknown Object (File)
Feb 15 2024, 10:46 AM
Unknown Object (File)
Feb 12 2024, 9:18 PM
Unknown Object (File)
Jan 18 2024, 1:42 PM

Details

Summary

String returned from sysctl() can't be longer than COMMLEN (19) symbols, so it returns bogus data for processes with long file name.
Use kvm and procstat librarires to obtain correct name and only use sysctl as a fallback.

Test Plan

make check for qlockfile passes.

Diff Detail

Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 17031
Build 16898: arc lint + arc unit

Event Timeline

You need to bump the PORTTREVISION too.

devel/qt5-core/files/patch-src_corelib_io_qlockfile__unix.cpp
17

^ shouldn't there be some chekc on the return value of kvm_open?

60

^ name is already defined on line 49.

  • Error handling
  • Bump PORTREVISION
rakuco added inline comments.
devel/qt5-core/files/patch-src_corelib_io_qlockfile__unix.cpp
12

Isn't it easier to just add a freebsd condition in the else block below?

} else {
  SOURCES += ...
  freebsd {
    LIBS += lkvm -lprocstat
  }
}
35

Style: the * needs to be next to kp (this applies to the other pointer declarations below too).

51

Style: this should've been part of the previous line.

69

Same here.

arrowd marked 4 inline comments as done.
  • Address rakuco's comments.

If @rakuco has nothing more to add, it looks fine to me.

Looks OK to me. It'd be good to clean this up and submit the patch upstream later.

This revision is now accepted and ready to land.Jun 12 2018, 5:43 AM
This revision was automatically updated to reflect the committed changes.

The patch file (148 lines) contains the same 74 line patch twice, thus the build doesn't even start because of "patch failed".