vamolessa / pepper

simple and opinionated modal code editor for your terminal
https://vamolessa.github.io/pepper/
372 stars 17 forks source link

`libc::daemon` is deprecated on mac #36

Closed vamolessa closed 2 years ago

vamolessa commented 2 years ago

What should we do in the mac case? Do we actually need it there?

We just use libc::daemon in other unix platforms to move the server executable to the background for it to not be killed when the first client closes. Maybe there's some other way to do it? Maybe on mac we can actually spawn the process directly as a daemon (using fork instead of posix_spawn right now)? Or maybe just expand the code inside mac's libc::daemon (which is here).

Need help on this since it's kinda hard for me to test since I don't have a mac accessible.

vamolessa commented 2 years ago

Fixed on 0.26.0 as it does not need to use libc::daemon anymore