From c9a3a7cb6bdc267afb4ffba6aab021bb42d9b5b7 Mon Sep 17 00:00:00 2001 From: Henrik Bengtsson Date: Tue, 26 Nov 2024 21:20:39 -0800 Subject: [PATCH] minor fixes --- NAMESPACE | 1 + R/cgroups.R | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/NAMESPACE b/NAMESPACE index 02cd6d8..d9d2aa8 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -74,4 +74,5 @@ importFrom(utils,read.table) importFrom(utils,str) importFrom(utils,tar) importFrom(utils,untar) +importFrom(utils,write.table) useDynLib("parallelly", .registration = TRUE, .fixes = "C_") diff --git a/R/cgroups.R b/R/cgroups.R index e58ba2f..2f81094 100644 --- a/R/cgroups.R +++ b/R/cgroups.R @@ -49,6 +49,7 @@ procPath <- local({ }) +#' @importFrom utils read.table readMounts <- function(file) { stopifnot(file_test("-f", file)) data <- read.table(file, sep = " ", stringsAsFactors = FALSE) @@ -63,6 +64,7 @@ readMounts <- function(file) { } +#' @importFrom utils write.table writeMounts <- function(mounts, file) { write.table(mounts, file = file, quote = FALSE, sep = " ", row.names = FALSE, col.names = FALSE) } @@ -83,6 +85,9 @@ getUID <- local({ #' @importFrom utils file_test tar cloneCGroups <- function(tarfile = "cgroups.tar.gz") { + ## To please R CMD check + type <- NULL + ## Temporarily reset overrides old_path <- procPath(NA) on.exit(procPath(old_path)) @@ -263,6 +268,9 @@ withCGroups <- function(tarball, expr = NULL, envir = parent.frame(), tmpdir = N # #' @importFrom utils file_test getCGroupsRoot <- local({ + ## To please R CMD check + type <- mountpoint <- NULL + .cache <- list() function(controller = "") {