Comments (3)
Thanks for the report. I think the issue is that, in this case, Stop returning nil is misleading because of this block:
// Nothing to stop if Start hasn't been called, or the proc hasn't started,
// or it's already done.
if c.statusChan == nil || !c.started || c.done {
return nil
}
If the cmd hasn't started yet, Stop returns nil which gives the impression that it was stopped ok when really it hadn't even started yet. So I don't think there's a race condition per-se, but rather that Stop should return an error, perhaps ErrNotRunning. In that case, caller knows that they need to wait and try again.
from cmd.
Yes, i think that would help. So it's easy to come back laster if the function returns ErrNotRunning.
from cmd.
Well it took a very long time, but finally fixed: #52
Thanks for reporting this!
from cmd.
Related Issues (20)
- wrong description of Status for receiving a signal of interrupt HOT 2
- not support cmd HOT 1
- special character '>' HOT 1
- How to hide the console window? HOT 2
- [streaming] Line breaks and buffer overflows (broken pipes) HOT 1
- The actual PID is 11 more than the obtained PID
- Part of #11517
- Updated and install
- How can I execute a sentence command directly? HOT 1
- 🔊
- Stdout empty when using Streaming HOT 6
- unable to use with binary stdout HOT 2
- Running a script to start an external application, when the main application terminates, the one started from the script crashes as it no longer has an Stdout & Stderr HOT 1
- make terminating process group optional HOT 1
- python command in streaming mode not streaming the stdout HOT 2
- cant go get HOT 3
- Command is still executed if Stop() is called during BeforeExec hooks HOT 1
- How to restart after Stop()
- the replacement of "+build" to "go:build" needs a change of go version in go mod
- when the process is ready HOT 1
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 cmd.