Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 25 additions & 17 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion HACKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ send patches you don't understand.
### Install a rust toolchain

If you have not already done so, install a rust toolchain.
The minimum rust version for shpool is `1.74.0`, so make sure that
The minimum rust version for shpool is `1.85.0`, so make sure that
`cargo --version` reports that version or higher before attempting
to build shpool. The easiest way to install an up to date
rust toolchain is with [`rustup`](https://rustup.rs/),
Expand Down
4 changes: 2 additions & 2 deletions libshpool/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "libshpool"
version = "0.9.4"
edition = "2021"
edition = "2024"
repository = "https://github.com/shell-pool/shpool"
authors = ["Ethan Pailes <pailes@google.com>"]
readme = "README.md"
Expand All @@ -13,7 +13,7 @@ disconnects.
'''
license = "Apache-2.0"
keywords = ["tmux", "tty", "terminal", "shell", "persistence"]
rust-version = "1.74"
rust-version = "1.85"

[features]
test_hooks = [] # for internal testing only, don't enable this feature
Expand Down
7 changes: 6 additions & 1 deletion libshpool/src/daemon/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,12 @@ pub fn run(
) -> anyhow::Result<()> {
if let Ok(daemonize) = env::var(consts::AUTODAEMONIZE_VAR) {
if daemonize == "true" {
env::remove_var(consts::AUTODAEMONIZE_VAR); // avoid looping
// Safety: this is executing before we have forked any threads,
// so we are still in single-threaded mode, therefore it is safe
// to mutate the global env.
unsafe {
env::remove_var(consts::AUTODAEMONIZE_VAR); // avoid looping
}

let pid_file = socket.with_file_name("daemonized-shpool.pid");

Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[toolchain]
channel = "1.74.0"
channel = "1.85.0"
components = ["rust-docs", "rust-src", "rust-analyzer"]
profile = "minimal"
4 changes: 2 additions & 2 deletions shpool-protocol/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "shpool-protocol"
version = "0.3.3"
edition = "2021"
edition = "2024"
authors = ["Ethan Pailes <pailes@google.com>"]
repository = "https://github.com/shell-pool/shpool"
readme = "../README.md"
Expand All @@ -11,7 +11,7 @@ You almost certainly don't need to use it directly.
'''
license = "Apache-2.0"
keywords = ["tmux", "tty", "terminal", "shell", "persistence"]
rust-version = "1.74"
rust-version = "1.85"

[dependencies]
anyhow = "1"
Expand Down
4 changes: 2 additions & 2 deletions shpool/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "shpool"
version = "0.9.4"
edition = "2021"
edition = "2024"
authors = ["Ethan Pailes <pailes@google.com>"]
repository = "https://github.com/shell-pool/shpool"
readme = "../README.md"
Expand All @@ -11,7 +11,7 @@ sessions to gracefully handle network disconnects.
'''
license = "Apache-2.0"
keywords = ["tmux", "tty", "terminal", "shell", "persistence"]
rust-version = "1.74"
rust-version = "1.85"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
7 changes: 6 additions & 1 deletion shpool/tests/kill.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@ fn empty() -> anyhow::Result<()> {
)
.context("starting daemon proc")?;

env::remove_var("SHPOOL_SESSION_NAME");
// Safety: I think this is actually wrong because tests can run
// in parallel. It hasn't ever caused a problem in practice though,
// and this is just a test, so I think it's fine.
unsafe {
env::remove_var("SHPOOL_SESSION_NAME");
}

let out = daemon_proc.kill(vec![])?;
assert!(!out.status.success());
Expand Down
Loading