Skip to content

Remove return value from pause #827

Closed
@Thomasdezeeuw

Description

@Thomasdezeeuw

Currently nix::unistd::pause returns an nix::Error, however it can only return EINTR as an error, which is the point of pause. It pauses until a signal is received. So I suggest to remove the return value completely and document that pause only returns if the process receives a signal.

If you want to be really safe maybe an assert can be added to check if the error is really EINTR, but then the OS/libc is vialting the spec.

Man page: http://pubs.opengroup.org/onlinepubs/9699919799/functions/pause.html.

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