Skip to content

Use pselect instead of self-pipe #4814

@egmontkob

Description

@egmontkob

Is there an existing issue for this?

  • I have searched the existing issues

Midnight Commander version and build configuration

current git (post-4.8.33)

Operating system

all

Is this issue reproducible using the latest version of Midnight Commander?

  • I confirm the issue is still reproducible with the latest version of Midnight Commander

How to reproduce

Forking from #4071:

Now that we use pselect() in our code, we could replace the self-pipe SIGWINCH reporting with proper use of pselect().

pselect() is POSIX since 2001, and implemented atomically in Linux in 2006.

The self-pipe trick is a well known workaround for systems that don't support an atomic, race-condition-free way of waiting for either a file descriptor activity or a signal. This is the exact problem pselect() was designed to solve in a clean way, obsoleting the need for the self-pipe trick.

Expected behavior

.

Actual behavior

.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: ttyInteraction with the terminal, screen librariesprio: mediumHas the potential to affect progress

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions