Skip to content

Commit 19c56cf

Browse files
authored
[illumos-utils] Use tokio::process::Command, not std::process::Command (#8141)
Many commands in `illumos-utils` bottomed out in a call to "std::process::Command", eventually exec-ing a process. These commands were often used from asynchronous code, even though they could block the calling thread. This PR converts many - but not all - of these calls to use `tokio::process::Command` instead, which no longer blocks the calling thread.
1 parent c8d8f00 commit 19c56cf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1066
-781
lines changed

clickhouse-admin/src/context.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,8 @@ async fn long_running_generate_config_task(
290290
generation_tx.clone(),
291291
clickward,
292292
node_settings,
293-
);
293+
)
294+
.await;
294295
if let Err(e) = response.send(result) {
295296
error!(
296297
&log,
@@ -324,7 +325,7 @@ impl NodeSettings {
324325
}
325326
}
326327

327-
fn generate_config_and_enable_svc(
328+
async fn generate_config_and_enable_svc(
328329
generation_tx: watch::Sender<Option<Generation>>,
329330
clickward: Clickward,
330331
node_settings: NodeSettings,
@@ -364,7 +365,7 @@ fn generate_config_and_enable_svc(
364365
generation_tx.send_replace(Some(incoming_generation));
365366

366367
// Once we have generated the client we can safely enable the clickhouse_server service
367-
Svcadm::enable_service(node_settings.fmri())?;
368+
Svcadm::enable_service(node_settings.fmri()).await?;
368369

369370
Ok(output)
370371
}

0 commit comments

Comments
 (0)