mirror of
https://github.com/zellij-org/zellij.git
synced 2024-11-23 19:10:09 +03:00
Do not unwrap() the sticky bit setting! (#2424)
It fails on FreeBSD, making the zellij server quit and the client spin endlessly retrying to connect.
This commit is contained in:
parent
6c802cec0d
commit
d124a1e469
@ -278,7 +278,8 @@ pub fn start_server(mut os_input: Box<dyn ServerOsApi>, socket_path: PathBuf) {
|
||||
// set the sticky bit to avoid the socket file being potentially cleaned up
|
||||
// https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html states that for XDG_RUNTIME_DIR:
|
||||
// "To ensure that your files are not removed, they should have their access time timestamp modified at least once every 6 hours of monotonic time or the 'sticky' bit should be set on the file. "
|
||||
set_permissions(&socket_path, 0o1700).unwrap();
|
||||
// It is not guaranteed that all platforms allow setting the sticky bit on sockets!
|
||||
drop(set_permissions(&socket_path, 0o1700));
|
||||
for stream in listener.incoming() {
|
||||
match stream {
|
||||
Ok(stream) => {
|
||||
|
Loading…
Reference in New Issue
Block a user