Skip to content

$^X is not full path when perl is searched in PATH on NetBSD and OpenBSD #23483

@leleliu008

Description

@leleliu008
-Duserelocatableinc=true

Configure option is passed.

relavant code : https://github.com/Perl/perl5/blob/blead/caretx.c#L61C9-L61C31

That code works on FreeBSD and DragonFlyBSD, but does not work on NetBSD and OpenBSD

NetBSD use this:

const int mib[] = { CTL_KERN, KERN_PROC_ARGS, -1, KERN_PROC_PATHNAME };

It is silightly different from FreeBSD

OpenBSD has no such API to get executable filepath. Developers should parse argv[0].

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions