Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
HenrikBengtsson committed Nov 27, 2024
1 parent 2c1589c commit c9a3a7c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -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_")
8 changes: 8 additions & 0 deletions R/cgroups.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
}
Expand All @@ -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))
Expand Down Expand Up @@ -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 = "") {
Expand Down

0 comments on commit c9a3a7c

Please sign in to comment.