It seems the BSD-specific sysctl KERN_PROC_PATHNAME may succeed without returning a valid path.
We now check check procfs in all cases where OS-specific functions won't return a valid path.
committed fixed with revision [r12310]
** [bugs:#1788] .RexxInfo~executable not working for NetBSD and OpenBSD**
Status: accepted Group: 5.0.0 Created: Thu Nov 18, 2021 05:34 PM UTC by Per Olov Jonsson Last Updated: Thu Nov 18, 2021 05:34 PM UTC Owner: Erich
rexx -e 'say .RexxInfo~executable' -> The NIL object
I have traced this back to SysProcess.cpp, line 105 ff
It seems the last modification made many (most) *nixes get the same error too.
I have just committed a change to NetBSD settings that should fix the ncurses problem, please wait until that build&test has finished on Jenkins to see if the change you committed actually fixed the problem for NetBSD and OpenBSD, ok?
It seems the BSD-specific sysctl KERN_PROC_PATHNAME may succeed without returning a valid path.
We now check check procfs in all cases where OS-specific functions won't return a valid path.
committed fixed with revision [r12310]
** [bugs:#1788] .RexxInfo~executable not working for NetBSD and OpenBSD**
Status: accepted Group: 5.0.0 Created: Thu Nov 18, 2021 05:34 PM UTC by Per Olov Jonsson Last Updated: Thu Nov 18, 2021 05:34 PM UTC Owner: Erich
rexx -e 'say .RexxInfo~executable' -> The NIL object
I have traced this back to SysProcess.cpp, line 105 ff
It seems the BSD-specific sysctl KERN_PROC_PATHNAME may succeed without returning a valid path.
We now check check procfs in all cases where OS-specific functions won't return a valid path.
committed fixed with revision [r12310]
Gil: I beg to disagree. This method is used throughout the test suite, resulting in 43 Errors, making the testing more or less pointless. OpenBSD and FreeBSD share this problem and FreeBSD only have one failing test beside this errors so it would be really important to get it fixed. Maybe we can reach out to people using these #nixes and learn how they solve the problem. The need to identify a running process must be present in all OSes. NetBSD does not show this error btw.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
My concern is that Erich indicates he sees no way to fix it. Now hopefully the BSD gurus will come back with a way but what if they don't? Then we can only document that this functionality is not available on those platforms and skip the testcases that fail when run on them.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The reason for "Looking for KERN_PROC_PATHNAME - not found" on FreeBSD is because sys/sysctl.h is not self contained, it needs sys/types.h as is seen in the man page.
To work it should be check_symbol_exists(KERN_PROC_PATHNAME "sys/types.h;sys/sysctl.h" HAVE_KERN_PROC_PATHNAME) . Just tested it and this line reports found on FreeBSD. Observe that "" is needed around the list of header files to include.
Included is a subversion diff file that fixes this and makes the sysctl work on NetBSD, NetBSD has different arguments for this than FreeBSD.
Concerning OpenBSD, getexecname for OpenBSD might be worth a look.
The reason for "Looking for KERN_PROC_PATHNAME - not found" on FreeBSD is because sys/sysctl.h is not self contained, it needs sys/types.h as is seen in the man page.
To work it should be check_symbol_exists(KERN_PROC_PATHNAME "sys/types.h;sys/sysctl.h" HAVE_KERN_PROC_PATHNAME) . Just tested it and this line reports found on FreeBSD. Observe that "" is needed around the list of header files to include.
Included is a subversion diff file that fixes this and makes the sysctl work on NetBSD, NetBSD has different arguments for this than FreeBSD.
Concerning OpenBSD, getexecname for OpenBSD might be worth a look.
Committed more fixes with revision [r12327].
On OpenBSD we have no other means as to resort to argv[0], but this will only be acceptable if it's an absolute path.
Thanks for the swift response, I have been weeding out things on the failing *nixes, they all now seems to build reliably (but still tests failing).
Hälsningar/Regards/Grüsse,
P.O. Jonsson
oorexx@jonases.se
Related
Bugs:
#1788Commit: [r12310]
It seems the last modification made many (most) *nixes get the same error too.
I have just committed a change to NetBSD settings that should fix the ncurses problem, please wait until that build&test has finished on Jenkins to see if the change you committed actually fixed the problem for NetBSD and OpenBSD, ok?
Hälsningar/Regards/Grüsse,
P.O. Jonsson
oorexx@jonases.se
Related
Bugs:
#1788Commit: [r12310]
It seems the BSD-specific sysctl KERN_PROC_PATHNAME may succeed without returning a valid path.
We now check check procfs in all cases where OS-specific functions won't return a valid path.
committed fixed with revision [r12310]
Related
Commit: [r12310]
fixed code with [r12312]
While other BSDs should work, OpenBSD will still return .nil
It neither supports KERN_PROC_PATHNAME nor procfs
I see no way to fix this
dladdr(main) would work (like below), but as it requires main it could only be added to rexx.cpp itself
I don't think we should do that
Related
Commit: [r12312]
I think it would be acceptable to make a note in the documentation on the executable method that it will return .nil on OpenBSD.
Gil: I beg to disagree. This method is used throughout the test suite, resulting in 43 Errors, making the testing more or less pointless. OpenBSD and FreeBSD share this problem and FreeBSD only have one failing test beside this errors so it would be really important to get it fixed. Maybe we can reach out to people using these #nixes and learn how they solve the problem. The need to identify a running process must be present in all OSes. NetBSD does not show this error btw.
My concern is that Erich indicates he sees no way to fix it. Now hopefully the BSD gurus will come back with a way but what if they don't? Then we can only document that this functionality is not available on those platforms and skip the testcases that fail when run on them.
In contrast to OpenBSD, FreeBSD supports KERN_PROC_PATHNAME - see
https://www.freebsd.org/cgi/man.cgi?query=sysctl&sektion=3&n=1
I don't know why our FreeBSD VM shows "Looking for KERN_PROC_PATHNAME - not found"
Possibly another missing definition for CMakeLists.txt?
The reason for "Looking for KERN_PROC_PATHNAME - not found" on FreeBSD is because sys/sysctl.h is not self contained, it needs sys/types.h as is seen in the man page.
To work it should be check_symbol_exists(KERN_PROC_PATHNAME "sys/types.h;sys/sysctl.h" HAVE_KERN_PROC_PATHNAME) . Just tested it and this line reports found on FreeBSD. Observe that "" is needed around the list of header files to include.
Included is a subversion diff file that fixes this and makes the sysctl work on NetBSD, NetBSD has different arguments for this than FreeBSD.
Concerning OpenBSD, getexecname for OpenBSD might be worth a look.
👍🙏
Von meinem iPhone gesendet
Related
Bugs:
#1788Committed more fixes with revision [r12327].
On OpenBSD we have no other means as to resort to argv[0], but this will only be acceptable if it's an absolute path.
Related
Commit: [r12327]
I think this bug report can be closed now?