Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing documentation for special character: Background #25

Closed
niecore opened this issue Jul 20, 2020 · 2 comments
Closed

Missing documentation for special character: Background #25

niecore opened this issue Jul 20, 2020 · 2 comments
Labels
bad-behavior tbot incorrectly handles a certain situation. documentation This issue is related to missing documentation

Comments

@niecore
Copy link

niecore commented Jul 20, 2020

No description provided.

@Rahix
Copy link
Owner

Rahix commented Jul 22, 2020

Hi!

I think I've left it out of documentation because it has a few nasty side-effects. If a program in the background still outputs to the console, this will silently break things. Ideally, a proper Background special symbol would always redirect output to prevent all console clobbering. E.g.

# Automatically adds redirects to /dev/null
m.exec0("python", "-m", "http.server", linux.Background)

# Redirect stdout
m.exec0("python", "-m", "http.server", linux.Background(stdout="/tmp/http.log"))

# Redirect stdout & stderr
m.exec0("python", "-m", "http.server", linux.Background(stdout="/tmp/http.log", stderr="/tmp/http-error.log"))

But this, of course, needs to be implemented first ...

@Rahix Rahix added bad-behavior tbot incorrectly handles a certain situation. documentation This issue is related to missing documentation labels Oct 13, 2020
Rahix added a commit that referenced this issue Oct 13, 2020
`linux.Background` has a number of issues related to command-output
clobbering the console.  Make this special token supress all output by
default and provide convenient file-redirection to save stdout/err.

With this change, `linux.Background` becomes much more usable, thus also
document it properly now.

Fixes #25.

Signed-off-by: Harald Seiler <hws@denx.de>
@Rahix Rahix closed this as completed in af18971 Oct 13, 2020
@Rahix
Copy link
Owner

Rahix commented Oct 13, 2020

Finally got around to adding this: https://tbot.tools/modules/machine_linux.html#tbot.machine.linux.Background

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bad-behavior tbot incorrectly handles a certain situation. documentation This issue is related to missing documentation
Projects
None yet
Development

No branches or pull requests

2 participants