Skip to content

Fails to compile - error[E0599]: no method named si_status found for struct siginfo_t #4

Closed
@vladimyr

Description

@vladimyr

Hi, @dylni 👋

unfortunately, those boring Starship folks are back again to report some more issues 🙃

This time v3.0.1 failed to compile inside termux/package-builder docker image (https://github.com/termux/termux-packages/blob/master/scripts/Dockerfile) which is used for cross-compiling Termux packages:
https://github.com/termux/termux-packages/runs/1944936544

I believe the environment itself isn't problematic but the way how si_status gets retrieved. Maybe I'm reading this completely wrong and at risk of asking something totally stupid: is it accidentally invoked instead of just being accessed? 🤔
https://github.com/dylni/process_control/blob/3.0.1/src/unix.rs#L171

signal.h manpage says si_status should be declared as an int struct member:

The <signal.h> header shall define the siginfo_t type as a
structure, which shall include at least the following members:

 int           si_signo  Signal number.
 int           si_code   Signal code.
 int           si_errno  If non-zero, an errno value associated with
                         this signal, as described in <errno.h>.
 pid_t         si_pid    Sending process ID.
 uid_t         si_uid    Real user ID of sending process.
 void         *si_addr   Address of faulting instruction.
 int           si_status Exit value or signal.
 long          si_band   Band event for SIGPOLL.
 union sigval  si_value  Signal value.

and compilation ends with following error:

error[E0599]: no method named `si_status` found for struct `siginfo_t` in the current scope
   --> /home/builder/.cargo/registry/src/github.com-1ecc6299db9ec823/process_control-3.0.1/src/unix.rs:171:58
    |
171 | ...                   value: unsafe { process_info.si_status() },
    |                                                    ^^^^^^^^^ method not found in `siginfo_t`

Once again, thank you for all your patience and extensive help in dealing with BSDs, and thank you in advance for all the future help! 💯

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependenciesIssues caused by or affecting dependencies

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions