-
-
Notifications
You must be signed in to change notification settings - Fork 105
[FIXED JENKINS-41755] background task execution #31
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
Conversation
|
Live from FOSDEM Hackathon waiting for some @jglick love |
|
Probably reasonable, but I am not going to touch it until #21 is merged. |
|
PR works as expected, though it would be useful to be able to read the stdout & stderr from the process, despite it being in the background. In my specific case, I would use this to check why an Android emulator process failed to launch (it writes errors to stderr (and stdout…)). |
jglick
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would be useful to be able to read the stdout & stderr from the process, despite it being in the background
You could just redirect stdio to some predefined file and read it when desired.
Do we actually need this feature? You can already write something like:
node {
sh 'emulator & echo $! > .pid'
try {
// whatever
} finally {
sh '[ -f .pid ] && kill `cat .pid`'
}
}(Or possibly something simpler, if the tool provides a standardized ID for running instances, such as vncserver does, or a Docker container ID as used by docker-workflow in its withRun utility. Also for production code use pwd tmp: true for a PID file location.)
| * @author Kohsuke Kawaguchi | ||
| */ | ||
| public class BackgroundTask implements Serializable { | ||
| private final DurableTaskStep.Execution execution; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eek!
|
Is it possible this might assist in the issue at https://issues.jenkins-ci.org/browse/JENKINS-42048 ? |
|
No. |
|
I think this can be closed, WDYT @dwnusbaum ? |
Please see JENKINS-41755 for the context.