mattn / goreman Goto Github PK
View Code? Open in Web Editor NEWforeman clone written in go language
License: MIT License
foreman clone written in go language
License: MIT License
how can i use -basedir option?
when i use like this: goreman start -basedir "/usr/local/etcd/Procfile"
i got an error: open Procfile: no such file or directory
When you run restart-all, it stops all the processes which causes the server to quit because there's no more processes. It needs to be aware that the processes will be start up again, so it doesn't quit prematurely.
make
rm -rf goreman goxz
go clean
go build -ldflags="-s -w -X main.revision=a041eb9" -o goreman .
# golang.org/x/sys/unix
/Users/zhf/go/1.18beta1/pkg/mod/golang.org/x/[email protected]/unix/syscall_darwin.1_13.go:25:3: //go:linkname must refer to declared function or variable
/Users/zhf/go/1.18beta1/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.1_13.go:27:3: //go:linkname must refer to declared function or variable
/Users/zhf/go/1.18beta1/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.1_13.go:40:3: //go:linkname must refer to declared function or variable
/Users/zhf/go/1.18beta1/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:28:3: //go:linkname must refer to declared function or variable
/Users/zhf/go/1.18beta1/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:43:3: //go:linkname must refer to declared function or variable
/Users/zhf/go/1.18beta1/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:59:3: //go:linkname must refer to declared function or variable
/Users/zhf/go/1.18beta1/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:75:3: //go:linkname must refer to declared function or variable
/Users/zhf/go/1.18beta1/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:90:3: //go:linkname must refer to declared function or variable
/Users/zhf/go/1.18beta1/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:105:3: //go:linkname must refer to declared function or variable
/Users/zhf/go/1.18beta1/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:121:3: //go:linkname must refer to declared function or variable
/Users/zhf/go/1.18beta1/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:121:3: too many errors
make: *** [build] Error 2
i am not good at go.
when i installed,happen:
$ go get github.com/mattn/goreman
/home/gocode/src/github.com/mattn/goreman/proc_posix.go:17: undefined: unix.SysProcAttr
i have config go path,like this:
#GO
export GOROOT=/usr/local/go/go
export GOPATH=/home/gocode
export PATH=$PATH:$NGINX_HOME/sbin:$GOROOT/bin:$GOPATH/bin:$CONSUL_HOME/consul
please~
It would be better to provide a high level design diagram, so that others can have a better understanding on this tool.
The latest building commit seems to be this one: eefab48
I was trying to go get github.com/mattn/goreman
and got an error:
$ go get github.com/mattn/goreman
# github.com/mattn/goreman
.go/src/github.com/mattn/goreman/log.go:20: undefined: net.Buffers
But if I try to do this:
$ go get github.com/mattn/goreman
# github.com/mattn/goreman
.go/src/github.com/mattn/goreman/log.go:20: undefined: net.Buffers
$ cd $GOPATH/src/github.com/mattn/goreman
$ git checkout eefab48836ce47f43c6614c008a8e08063a3d398
$ go build github.com/mattn/goreman
Everything works fine.
I believe there are either some missing dependencies or incorrect installment, but seems like eefab48 is the last commit that corresponds with the Getting Started section in README.md
Unfortunetely I am not a strong Go developer but I suppose it is either e06e615661116559a2e76ede8f8c48244c066767
to be reverted and reworked or Getting Started section to be updated with the most recent installation instructions.
$ cat /etc/*-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.4 LTS"
NAME="Ubuntu"
VERSION="16.04.4 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.4 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
$ go version
go version go1.6.2 linux/amd64
I would love to be able to do this goreman run restart service1 service2
There is a "break" statement in each case clause in the switch statement in the main function. Actually it isn't needed if it's the last statement.
I've tested the latest v0.3.11
on Linux, and when under load, it seems that goreman
reads partial lines and writes them to stdout, thus the output looks like "screen tearing".
For example:
2022/04/07 14:47:40 [tools] Compiling
2022/04/07 14:47:40 [tools] tools-server v0.0.0 (/.../tools/sources/rust)
2022/04/07 14:47:40 [docs]
2022/04/07 14:47:40 [docs] Compiling docs-server v0.0.0 (/.../docs/sources/rust)
2022/04/07 14:47:40 [wiki]
2022/04/07 14:47:40 [wiki]
2022/04/07 14:47:40 [wiki]
2022/04/07 14:47:40 [wiki] Compiling
2022/04/07 14:47:40 [wiki]
2022/04/07 14:47:40 [wiki] wiki-server
2022/04/07 14:47:40 [wiki] v
2022/04/07 14:47:40 [wiki] 0
2022/04/07 14:47:40 [wiki] .
2022/04/07 14:47:40 [wiki] 0
2022/04/07 14:47:40 [wiki] .
2022/04/07 14:47:40 [wiki] 0
2022/04/07 14:47:40 [wiki] (
2022/04/07 14:47:40 [wiki] /.../wiki/sources/rust
2022/04/07 14:47:40 [wiki] )
All these lines should be something like [space] Compiling whatever-server v0.0.0 (/.../whatever/sources/rust)
. As one can see, none of the lines are written correctly.
My assumption is that goreman
uses a simple read
and assumes it has received an entire line. However under load (as is the case here) for some reason that doesn't hold.
Sometimes the configuration in Procfile
is such that one process depends on execution of another. But currently there is no way to define order. The procs are read from file and pushed in a map
. Iterating over the map does not give any guarantees on traversal, so procs are being spawned in any order.
If we use "container/list"
instead of map
, order of spawning procs can be same as order in the procfile
.
https://github.com/mattn/goreman/blob/master/goreman.go#L66
I am not sure if this is a breaking change for users.
I can send a PR if you agree to change this.
I installed goreman using go get. However I'm unable to start the service.
Error -bash: goreman: command not found
Am I missing something?
Hi
Is it possible to use a normally ip address like 192.168.0.1 to start a cluster to connect through another PC with a jtcd client?
I would love to be able to restart all services that have been started with goreman start
e.g. goreman restart
example:
raftc1:
raftexample1: ./raftexample --id 1 --cluster http://127.0.0.1:12379,http://127.0.0.1:22379,http://127.0.0.1:32379
raftexample2: ./raftexample --id 2 --cluster http://127.0.0.1:12379,http://127.0.0.1:22379,http://127.0.0.1:32379
raftexample3: ./raftexample --id 3 --cluster http://127.0.0.1:12379,http://127.0.0.1:22379,http://127.0.0.1:32379
raftc2:
raftexample4: ./raftexample --id 1 --cluster http://127.0.0.1:12379,http://127.0.0.1:22379,http://127.0.0.1:32379
raftexample5: ./raftexample --id 2 --cluster http://127.0.0.1:12379,http://127.0.0.1:22379,http://127.0.0.1:32379
raftexample6: ./raftexample --id 3 --cluster http://127.0.0.1:12379,http://127.0.0.1:22379,http://127.0.0.1:32379
how start a group process
goreman run start raftc1.raftexample3
thank u.
Hi, i would like to know if it would be possible to have an "armhf" version of goreman available in release's downloads.
Thanks.
On windows 7, go 1.0.3:
.\proc_windows.go:25: unknown syscall.SysProcAttr field 'CreationFlags' in struct literal
.\proc_windows.go:60: undefined: syscall.CTRL_C_EVENT
Hi, when I run goreman run status
get goreman: dial tcp 127.0.0.1:8555: connect: connection refused
. How should I do?
I know we have an --exit-on-error
flag to make sure goreman dies upon seeing a subprocess returning non-zero status code.
Thing is, how do I make sure goreman dies whenever a single subprocess dies regardless the exit code?
i am thinking about using goreman
as a controller for job executions.
for example this one would run two jobs locally -
j1: curl "www.google.com" | process
j2: curl "www.yahoo.com" | process
and this one would run the job on a remote machine:
j1: curl "www.google.com" | process
j2: ssh w1 'curl "www.yahoo.com" | process'
what's the best way to achieve that?
also, is it possible to add handler for "on proc done" ?
(so i can use that event in order to clean up / copy out the result of the proc)
Hi i am trying to run goreman in windows: using the proc file attached below:
agent-1: mkdir -p agent-1 && cd agent-1 && ../bin/etcd-agent -etcd-path ../bin/etcd -port localhost:19027 -use-root=false
agent-2: mkdir -p agent-2 && cd agent-2 && ../bin/etcd-agent -etcd-path ../bin/etcd -port localhost:29027 -use-root=false
agent-3: mkdir -p agent-3 && cd agent-3 && ../bin/etcd-agent -etcd-path ../bin/etcd -port localhost:39027 -use-root=false
stresser: sleep 1s && bin/etcd-tester -agent-endpoints "localhost:19027,localhost:29027,localhost:39027" -client-ports 12379,22379,32379 -peer-ports 12380,22380,32380
I am getting the below logs:
PS D:\GO_PROJECTS\src\github.com\coreos\etcd> goreman -f tools/functional-tester/Procfile start
16:22:39 stresser | Starting stresser on port 5003
16:22:39 agent-2 | Starting agent-2 on port 5001
16:22:39 agent-1 | Starting agent-1 on port 5000
16:22:39 agent-3 | Starting agent-3 on port 5002
16:22:39 agent-2 | '..' is not recognized as an internal or external command,
16:22:39 agent-2 | operable program or batch file.
16:22:39 agent-2 | Terminating agent-2
16:22:39 stresser | 'sleep' is not recognized as an internal or external command,
16:22:39 stresser | operable program or batch file.
16:22:39 stresser | Terminating stresser
16:22:39 agent-3 | A subdirectory or file -p already exists.
16:22:39 agent-3 | Error occurred while processing: -p.
16:22:39 agent-3 | Terminating agent-3
16:22:39 agent-1 | A subdirectory or file -p already exists.
16:22:39 agent-1 | Error occurred while processing: -p.
16:22:39 agent-1 | Terminating agent-1
One issue i see is -p instead of taking it as a path for flag is creating another folder with -p. The other issue is its giving error on ../bin/etcd-agent -etcd-path.. for ../bin
Can you add a small section in the README or a shell script to compile this tool ?
Looks like the normally generated files for github releases are missing :(
Can you generate the files for us so we can use your excellent project easier :)
Should goreman restart the proc when the proc was killed?
Support installation from Homebrew.
I had an idea to make it possible to terminate the other subprocesses if one process exits with an error. Right now that's difficult because the events are handled all over the place. I count five different ways that a goreman subprocess can quit:
Immediately on cmd.Start()
failure, which usually means the command could
not be found on the PATH, it's not executable, or some other failure starting
the subprocess.
Subprocess decides to exit.
Individually stopped by rpc.go.
Stopped (and immediately restarted) by rpc.go.
By a signal forwarded to the subprocess from the parent, e.g SIGTERM.
These are variously handled in different places across the codebase, which makes inter-process signaling difficult.
Consolidating these into a single place where all incoming events are handled, from different sources:
Could simplify the event handling logic. The problem is it would involve a lot of refactoring of the code. I can try to make it as incremental as possible, but it might be difficult.
I load my app in a custom port in development using a .foreman
file. Here's an example of a file that I use where I have to do some local SSL testing:
port: 5001
ssl_port: 5043
I tried copying this file to .goreman
to see if that was the convention, but Goreman doesn't pick up these settings.
FYI today I got challenged with "why did you replace foreman with goreman in this project? is it a concern that its only v0.3.4?"
It did raise the question in my own mind: is the project stable enough to bump to v1.0.0?
Hi,
I am trying to run a multi cluster with etcd and when I try to run goreman using "go get github.com/mattn/goreman", I get the following error:
$ go get github.com/mattn/goreman
./proc.go:89:2: error: ‘state’ declared and not used
state := true
^
Any idea what could be causing this?
In the linux shell, when the line is too long, I can use '\' to break it.
./program1 --arg1=1 \
--arg2=2 \
--arg3=3
But it seems that goreman does not support this. When I try
// Procfile
ls: ls -a \
-l
goreman start
I got
21:07:19 ls | Starting ls on port 5000
21:07:19 ls | ls: cannot access '\': No such file or directory
21:07:19 ls | Terminating ls
start faield ?
goreman run -f otel/example/Procfile
error
goreman: open Procfile: no such file or directory
Would it be possible to add a compiled version for musl ?
it would be useful for docker deployments.
when run directly, you'll note that there are two empty lines at the end, but not in goreman:
sridharr@dhcp-26 ~/d/c/aura> make
/Users/sridharr/go/bin/goreman start
2012/10/01 20:41:10 [web] START
2012/10/01 20:41:10 [web] https://api.dropbox.com/1/account/info?
2012/10/01 20:41:10 [web] {ReferralLink: DisplayName: Uid:0 Country: QuotaInfo:{Shared:0 Quota:0 Normal:0}}
2012/10/01 20:41:10 [web] QUIT
sridharr@dhcp-26 ~/d/c/aura> ./aura
https://api.dropbox.com/1/account/info?
{ReferralLink: DisplayName: Uid:0 Country: QuotaInfo:{Shared:0 Quota:0 Normal:0}}
sridharr@dhcp-26 ~/d/c/aura>
I've submitted this project for inclusion/installation via Homebrew. The Homebrew maintainers asked for vendoring, which we just recently merged.
However, the Homebrew maintainers are asking for us to install from a tagged release. We don't have a tagged release for vendored code yet.
Could we tag a new release v0.2.1, and push it?
Updates Homebrew/homebrew-core#32445.
Updates #73.
Sometimes I want to control these processes to be started one by one, rather than start parallel. But I can't handle it easily now:
I can use goreman run start [process]
, but goreman process itself must be started before. Since goreman hasn't a "daemon" model, it seems that I have to run goreman start [process] &
, and then use goreman run ...
.
I wonder if goreman have a "daemon" model for running itself. For example:
goreman start -d # start nothing but itself, as a daemon process
goreman run start .... # use "goreman run" command
goreman stop # stop goreman daemon process itself
What do you think abou this? @mattn
$ goreman -f Procfile_db run stop p1
# <- blocks here
^C
$ goreman -f Procfile_db run stop p1
no such process
and nothing is going on at my terminale window where I run
$ goreman -f Procfile_db start
19:53:23 p1 | Starting p1 on port 5000
19:53:23 p3 | Starting p3 on port 5002
19:53:23 p2 | Starting p2 on port 5001
19:53:23 p2 | I0227 19:53:23.450337 27167 main.go:88] ...
19:53:23 p2 | I0227 19:53:23.450390 27167 main.go:101] ...
19:53:23 p1 | I0227 19:53:23.450827 27166 main.go:88] ...
19:53:23 p1 | I0227 19:53:23.450872 27166 main.go:101] ...
19:53:23 p3 | I0227 19:53:23.450982 27171 main.go:88] ...
system: ubuntu 16.10
$ uname -a:
inux nik-msi 4.4.0-64-generic #85-Ubuntu SMP Mon Feb 20 11:50:30 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
$ go version
go version go1.8rc3 linux/amd64
$ go get -u -v github.com/mattn/goreman
github.com/mattn/goreman (download)
github.com/daviddengcn/go-colortext (download)
github.com/joho/godotenv (download)
Fetching https://gopkg.in/yaml.v2?go-get=1
Parsing meta tags from https://gopkg.in/yaml.v2?go-get=1 (status code 200)
get "gopkg.in/yaml.v2": found meta tag main.metaImport{Prefix:"gopkg.in/yaml.v2", VCS:"git", RepoRoot:"https://gopkg.in/yaml.v2"} at https://gopkg.in/yaml.v2?go-get=1
gopkg.in/yaml.v2 (download)
I am using goreman to run multiple processes inside the docker container and all processes's output is in json format but goreman adds its own output (name of the process).
Example of Procfile:
nginx: /usr/sbin/nginx
output I got:
14:09:37 nginx | {"remote_addr":"127.0.0.1","remote_user":"","time_local":"14/Apr/2020:14:09:37 +0000","request":"GET / HTTP/1.1","status":"200","body_bytes_sent":"612","http_referer":"","http_user_agent":"curl/7.58.0","request_time":"0.000",}
but I need only:
{"remote_addr":"127.0.0.1","remote_user":"","time_local":"14/Apr/2020:14:09:37 +0000","request":"GET / HTTP/1.1","status":"200","body_bytes_sent":"612","http_referer":"","http_user_agent":"curl/7.58.0","request_time":"0.000",}
(without 14:09:37 nginx |
part).
Is it possible to implement it?
检测到 mattn/goreman 一共引入了9个开源组件,存在1个漏洞
漏洞标题:go-yaml < 2.2.8拒绝服务漏洞
缺陷组件:gopkg.in/[email protected]
漏洞编号:CVE-2019-11254
漏洞描述:gopkg.in/yaml.v2是go语言中用于处理yaml格式的包。
在2.2.8之前的版本中,处理恶意的yaml数据时,会导致CPU资源耗尽。
漏洞由Kubernetes开发者在fuzz测试中发现并提交修复补丁。
国家漏洞库信息:https://www.cnvd.org.cn/flaw/show/CNVD-2020-35519
影响范围:(∞, 2.2.8)
最小修复版本:2.2.8
缺陷组件引入路径:github.com/mattn/goreman@->gopkg.in/[email protected]
另外还有几个漏洞,详细报告:https://mofeisec.com/jr?p=a9b57c
Line 142 in ede3030
The newly added defaultServer
calls itself, resulting in:
runtime: goroutine stack exceeds 1000000000-byte limit
fatal error: stack overflow
runtime stack:
runtime.throw(0x7de0ce, 0xe)
/usr/local/go/src/runtime/panic.go:619 +0x81
runtime.newstack()
/usr/local/go/src/runtime/stack.go:1054 +0x71f
runtime.morestack()
/usr/local/go/src/runtime/asm_amd64.s:480 +0x89
goroutine 1 [running]:
sync.(*Once).Do(0xa06638, 0x7f5908)
/usr/local/go/src/sync/once.go:35 +0xf5 fp=0xc44018c358 sp=0xc44018c350 pc=0x46cb35
syscall.Getenv(0x7dfb87, 0x12, 0x0, 0x0, 0x46fd00)
/usr/local/go/src/syscall/env_unix.go:72 +0x4a fp=0xc44018c398 sp=0xc44018c358 pc=0x46fc6a
os.Getenv(0x7dfb87, 0x12, 0xa07260, 0x0)
/usr/local/go/src/os/env.go:85 +0x4d fp=0xc44018c3d0 sp=0xc44018c398 pc=0x49415d
main.defaultServer(0x216b, 0x12, 0x0)
/home/sqs/src/github.com/mattn/goreman/goreman.go:138 +0x3a fp=0xc44018c438 sp=0xc44018c3d0 pc=0x70fd9a
main.defaultServer(0x216b, 0x12, 0x0)
/home/sqs/src/github.com/mattn/goreman/goreman.go:142 +0x6b fp=0xc44018c4a0 sp=0xc44018c438 pc=0x70fdcb
main.defaultServer(0x216b, 0x12, 0x0)
/home/sqs/src/github.com/mattn/goreman/goreman.go:142 +0x6b fp=0xc44018c508 sp=0xc44018c4a0 pc=0x70fdcb
main.defaultServer(0x216b, 0x12, 0x0)
/home/sqs/src/github.com/mattn/goreman/goreman.go:142 +0x6b fp=0xc44018c570 sp=0xc44018c508 pc=0x70fdcb
main.defaultServer(0x216b, 0x12, 0x0)
/home/sqs/src/github.com/mattn/goreman/goreman.go:142 +0x6b fp=0xc44018c5d8 sp=0xc44018c570 pc=0x70fdcb
main.defaultServer(0x216b, 0x12, 0x0)
/home/sqs/src/github.com/mattn/goreman/goreman.go:142 +0x6b fp=0xc44018c640 sp=0xc44018c5d8 pc=0x70fdcb
main.defaultServer(0x216b, 0x12, 0x0)
/home/sqs/src/github.com/mattn/goreman/goreman.go:142 +0x6b fp=0xc44018c6a8 sp=0xc44018c640 pc=0x70fdcb
main.defaultServer(0x216b, 0x12, 0x0)
/home/sqs/src/github.com/mattn/goreman/goreman.go:142 +0x6b fp=0xc44018c710 sp=0xc44018c6a8 pc=0x70fdcb
...
`
Besides foreman, @ddollar also created forego:
I use goreman to run etcd local tester https://github.com/coreos/etcd/tree/master/tools/local-tester but find that run stop
will hand up forever and the process can't be killed.
Refer https://medium.com/@felixge/killing-a-child-process-and-all-of-its-children-in-go-54079af94773, I set syscall.SysProcAttr{Setpgid: true}
to the SysProcAttr, and find it works well.
## Install goreman
RUN \
curl -sL https://github.com/mattn/goreman/releases/download/v0.0.10/goreman_linux_amd64.zip > /tmp/goreman.zip && \
unzip -d /usr/bin /tmp/goreman.zip && rm /tmp/goreman.zip && \
chmod +x /usr/bin/goreman
kill -QUIT <PID>
SIGQUIT: quit
PC=0x460e53 m=2
goroutine 0 [idle]:
runtime.futex(0x949b18, 0x0, 0x7f73ff299dc8, 0x0, 0x7f7300000000, 0x460b76, 0x3c, 0x0, 0x7f73ff299e10, 0x414b0b, ...)
/goroot/src/runtime/sys_linux_amd64.s:388 +0x23
runtime.futexsleep(0x949b18, 0x0, 0xdf8475800)
/goroot/src/runtime/os_linux.go:62 +0xd7
runtime.notetsleep_internal(0x949b18, 0xdf8475800, 0x1)
/goroot/src/runtime/lock_futex.go:174 +0xeb
runtime.notetsleep(0x949b18, 0xdf8475800, 0x7f01)
/goroot/src/runtime/lock_futex.go:194 +0x56
runtime.sysmon()
/goroot/src/runtime/proc.go:3618 +0x14c
runtime.mstart1()
/goroot/src/runtime/proc.go:1126 +0x11e
runtime.mstart()
/goroot/src/runtime/proc.go:1096 +0x64
goroutine 1 [chan receive]:
main.startProcs(0x18, 0x7d2278)
/gopath/src/github.com/mattn/goreman/proc.go:88 +0x24d
main.start(0xc4201300f0, 0x5, 0x7a0bdb)
/gopath/src/github.com/mattn/goreman/goreman.go:175 +0x1db
main.main()
/gopath/src/github.com/mattn/goreman/goreman.go:219 +0x553
goroutine 17 [syscall, locked to thread]:
runtime.goexit()
/goroot/src/runtime/asm_amd64.s:2086 +0x1
Is there any plan to implement export
command?
Currently only the "stop" command is sent to the main goroutine via a channel, and all other commands are processed directly by the RPC server.
The better way is to send all commands to the main goroutine, and then processed by the main goroutine.
What's your thought?
Each time you start the server the processes are assigned different colors. It would be nice if the same processes were given the same colors.
This could be assigned based on the line in the config file that starts the subprocess, for example.
This would require making procs
aware of the order in which variables are inserted and then passing through that order to e.g. proc_posix.go
and createLogger
.
I'm happy to work on it if you'd like to go in this direction.
fyi, the "official" port https://github.com/ddollar/forego
web5: go run web.go -a :$PORT
It will cause client hang while stop web5,because of "http://stackoverflow.com/questions/24982845/process-kill-on-child-processes"
We need compile web.go to solve this problem,like below
web5: go run ./web -a :$PORT
I recommend add timeout feature for function stopProc
func stopProc(proc string, quit bool) error {
p, ok := procs[proc]
if !ok {
return errors.New("Unknown proc: " + proc)
}
p.mu.Lock()
defer p.mu.Unlock()
if p.cmd == nil {
return nil
}
p.quit = quit
err := terminateProc(proc)
if err != nil {
return err
}
var done = make(chan bool, 1)
go func(done chan bool) {
p.cond.Wait()
done <- true
}(done)
select {
case <-time.After(1 * time.Second):
p.cond.Signal()
<- done
err = errors.New("stop timeout")
case <-done:
err = nil
}
return err
}
Would be lovely to be able to go to the Releases page and get the URL for a pre-compiled version to drop into Linux machines that don't have go already setup on them.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.