sys icon indicating copy to clipboard operation
sys copied to clipboard

Powerful replacements for base::system2

Results 5 sys issues
Sort by recently updated
recently updated
newest added

```r > sys::exec_internal(character()) Error in execute(cmd = cmd, args = args, std_out = outfun, std_err = errfun, : CHAR() can only be applied to a 'CHARSXP', not a 'NULL' ```

In order to activate a conda env prior to running the system command, I'm using `bash -c ". ~/.bashrc; conda activate MY_CONDA_ENV; MY ACTUAL COMMAND"` This works with `system2()`, but...

Make sure askpass doesn't freeze when it is called in a background task.

The function `C_execute` forks the current process and in the child process it uses some R API ([example](https://github.com/jeroen/sys/blob/master/src/exec.c#L177)). The potential issue with that is that, e.g., with the `ALTREP` framework...

```r library(sys) # system2 dies along with the parent proc eval_fork({system2("ping", "localhost", wait = FALSE); Sys.sleep(3)}) # pipe breaks when interrupted, but process lives on! (on OSX at least) eval_fork(exec_wait("ping",...