Comments (6)
I cannot reproduce this, for me the container is running happily. (I only had to add --platform=linux/amd64
on arm Linux.)
What do
postgres$get_exit_status()
postgres$read_error()
say?
from processx.
Hi, I try put the param on docker, sadly, does not works, I should had provided more info.
I'm using Gentoo 64 (Linux)
> postgres <- processx::process$new(
"docker",
c(
"run",
"--rm",
"-p", "5433:5432",
"-e", "POSTGRES_USER=user",
"-e", "POSTGRES_PASSWORD=password",
"-e", "POSTGRES_DB=db",
"postgis/postgis",
"-c", "max_worker_processes=8",
"-c", "max_parallel_workers=7",
"-c", "max_parallel_workers_per_gather=7",
"-c", "max_parallel_maintenance_workers=7", "--platform=linux/amd64"
))
> postgres
PROCESS 'docker', running, pid 94310.
> postgres
PROCESS 'docker', running, pid 94310.
> postgres
PROCESS 'docker', running, pid 94310.
> postgres
PROCESS 'docker', finished.
> postgres
PROCESS 'docker', finished.
> postgres$get_exit_status()
[1] 125
> postgres$read_error()
Error in `process_get_error_connection(self, private)`:
! stderr is not a pipe.
Type .Last.error to see the more details.
> .Last.error
<rlib_error_3_0/rlib_error/error>
Error in `process_get_error_connection(self, private)`:
! stderr is not a pipe.
---
Backtrace:
1. postgres$read_error()
2. processx:::process_read_error(self, private, n)
3. processx:::process_get_error_connection(self, private)
4. processx:::throw(new_error("stderr is not a pipe."))
from processx.
You still need to use stdout = "|", stderr = "|"
to be able to read the standard output and error.
from processx.
Well, there is a weird things:
- I notice there was a running docker in the same port, so the error tells me that
- Using
kill
on the process, literally kills it, don't close it, due to that, seems docker is not able to clean the container (is runing with--rm
) - I don't get why we need
platform
from R, in the terminal all works fine without that param.
Instead kill, interrupt
does the trick :)
Thx!
from processx.
- Using
kill
on the process, literally kills it, don't close it, due to that, seems docker is not able to clean the container (is runing with--rm
)
You can use $signal(15)
to send a SIGTERM
, that is better than SIGINT
and SIGKILL
.
I don't get why we need platform from R, in the terminal all works fine without that param.
You might not, I needed it, because I am on an arm machine, and this container seems to be amd64 only.
from processx.
Hi, seems signal 15 does not close it, for now only works interrupt.
from processx.
Related Issues (20)
- Test failure on 10.6.8: Error ('test-ps-methods.R:18'): ps methods HOT 2
- Document common options for output encoding of Windows tools HOT 2
- User-defined process name HOT 2
- Different behaviour inside and outside functions HOT 5
- `$call` should be a call or `NULL` in error objects HOT 3
- Release processx 3.8.1
- Release processx 3.9.0 HOT 1
- get_pid() different from Sys.getpid() on Windows HOT 2
- Compiler error during install: -fPIE HOT 7
- Unnable to read more than 78643 chars from stdout pipe HOT 3
- Release processx 3.8.2
- arguments with special character like \'~\' case an error. HOT 2
- Process hangs when using pipes with `stdout`, `stderr` for `latexmk -pdf` compilation HOT 2
- Move httpbin to test-poll-curl.R? HOT 2
- Upkeep for processx (2022)
- Use cli errors or file an issue if you don't have time to do it now
- `usethis::use_standalone("r-lib/rlang", "types-check")` instead of home grown argument checkers;
- Add alt-text to pictures, plots, etc; see https://posit.co/blog/knitr-fig-alt/ for examples
- processx update from CRAN HOT 3
- Installation from CRAN failed on Fedora 30 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from processx.