Comments (4)
Command: PORT=3000 CompileDaemon -command="go run main.go"
Both graceful and not result in the same output.
from compiledaemon.
If I had to venture a guess then it is probably due to the socket not being closed fast enough (still waiting for an ACK from some connection, for example) and is still in CLOSE_WAIT
state. You can verify this by running netstat -ton | grep CLOSE_WAIT
in parallel.
There is no real fix for this other than terminating the connections beforehand (or not keeping them open at first) or to wait some time before the command the next time (in a pickle you could create a shell script that runs sleep 1 && go run main.go
, for example).
from compiledaemon.
So I've found the reason, it's because it's not actually killing the child processes.
Even if I do the second thing in a bash script, it doesn't kill the server pid it kills the parent process pid. See: https://stackoverflow.com/questions/24982845/process-kill-on-child-processes
When I re-execute the binary it works and kills and restarts it properly (although the code obviously doesn't change).
I would argue that this library should kill the child processes too.
from compiledaemon.
ahh my bad there's a build command, so that does work! Thanks!
from compiledaemon.
Related Issues (20)
- Use CompileDaemon with go generate? HOT 4
- Latest commit tag not included in master
- include multiple directories HOT 2
- Terminate the program if a build fails
- Restart the program if it fails HOT 2
- Docker + Go 1.18 = /bin/sh: CompileDaemon: not found HOT 2
- package math/bits: unrecognized import path "math/bits" (import path does not begin with hostname) HOT 2
- Install for go 1.18+ HOT 10
- CompileDeamon not found golang 1.18 HOT 10
- "CompileDaemon": executable file not found in $PATH: unknown HOT 2
- Docker - File Changes not being Acknowledged
- Security Best Practice HOT 1
- 1.19 "stuck" on Build ok. HOT 3
- Support go.work
- Could not start command: can't start command: fork/exec ~/directory/to/go-project: no such file or directory HOT 1
- Go does not rebuild when .env file is changed
- Docker MacOS no rebuilding even with pulling on HOT 2
- error obtaining VCS status: exit status 128 HOT 1
- CompileDaemon did not install with vendor directory HOT 1
- Not detecting changes with Docker running on Windows with Linux containers in WSL 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 compiledaemon.