Skip to content

x/sys/unix: Prctl should return (int, error) #35978

@robertlacroix

Description

@robertlacroix

What version of Go are you using (go version)?

go1.13.4

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

Linux on amd64

According to http://man7.org/linux/man-pages/man2/prctl.2.html the signature of prctl is

int prctl(int option, unsigned long arg2, unsigned long arg3, unsigned long arg4, unsigned long arg5);

unix.Prctl on the other hand is not returning the int. For some options that return value is relevant, for example PR_GET_NO_NEW_PRIVS and others (search for as the function result in the man page).

Could unix.Prctl be changed to return (int, error)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions