Comments (8)
Unfortunately, I don't think OpenBSD can be supported. This crate makes a strong effort to not terminate the wrong process under any circumstance. To make that happen, waitid
is called in careful combination with other syscalls. However, it's not implemented for this platform AFAICT.
Do you know an alternative to waitid
that's OpenBSD-specific or have any other suggestions?
from process_control.
I'm closing this, since one of the starship maintainers indicated that they're close to merging a fix for this issue. If further use cases arise for this platform to be supported, this can be reopened.
from process_control.
@dylni I'm not sure what exact functionality you're looking for in a waitid
equivalent, but OpenBSD does have wait3
and wait4
which might be usable: http://man.openbsd.org/wait4
from process_control.
@AaronM04 I use it to wait on processes without letting them terminate. That's the purpose of the WNOWAIT
flag, which I use here:
Lines 159 to 164 in 56f388f
Unfortunately, I don't see any way to do that with wait3
or wait4
.
If there's nothing equivalent, one option is to make Timeout::terminating
a compile error for this target and add Timeout::terminating_if_possible
to only terminate for other targets. Would that work for your use case? Long-running processes would never be killed on OpenBSD with that implementation.
The best option would be to find a platform-specific syscall for this platform, but I don't think one exists.
from process_control.
@dylni this is the use case I'm concerned with: https://github.com/starship/starship/blob/master/src/utils.rs#L288
If I understand you correctly, this would be a compile error, so no, it wouldn't work.
from process_control.
@AaronM04 I responded at the starship repository.
from process_control.
Thanks for looking into this! 😀
from process_control.
No problem! 😀 I'm glad it'll have a favorable resolution.
from process_control.
Related Issues (9)
- Doesn't compile on Illumos HOT 7
- openbsd does not have a waitid system call and should use wait4 instead HOT 2
- Release a new version for windows-sys 0.42 HOT 1
- [FEATURE] CPU limit HOT 2
- Fails to compile - error[E0599]: no method named `si_status` found for struct `siginfo_t` HOT 6
- Bump libc dependency to 0.2.98 HOT 4
- Memory Limit Exceeded Support HOT 4
- build for Android failed HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from process_control.