fix(pidproxy): replace Timer with Ticker
tested: ssh-docker
This commit is contained in:
parent
70a4d132c3
commit
7785b3ec48
@ -105,8 +105,12 @@ background service is still running, in current implementation it checks every s
|
|||||||
```shell
|
```shell
|
||||||
wmpidproxy --pid-file <path to pid file> -- <background service binary/start script>
|
wmpidproxy --pid-file <path to pid file> -- <background service binary/start script>
|
||||||
```
|
```
|
||||||
|
#### Example
|
||||||
|
Running sshd background with `wingmate` and `wmpidproxy`: [here](example/ssh-docker/)
|
||||||
|
|
||||||
## Wingmate Exec binary
|
## Wingmate Exec binary
|
||||||
|
|
||||||
|
|
||||||
## Wingmate core binary
|
## Wingmate core binary
|
||||||
### Service
|
### Service
|
||||||
### Cron
|
### Cron
|
||||||
|
|||||||
@ -94,13 +94,13 @@ func pidProxy(cmd *cobra.Command, args []string) error {
|
|||||||
err error
|
err error
|
||||||
pid int
|
pid int
|
||||||
sc chan os.Signal
|
sc chan os.Signal
|
||||||
t *time.Timer
|
t *time.Ticker
|
||||||
)
|
)
|
||||||
|
|
||||||
sc = make(chan os.Signal, 1)
|
sc = make(chan os.Signal, 1)
|
||||||
signal.Notify(sc, unix.SIGTERM)
|
signal.Notify(sc, unix.SIGTERM)
|
||||||
|
|
||||||
t = time.NewTimer(time.Second)
|
t = time.NewTicker(time.Second)
|
||||||
|
|
||||||
check:
|
check:
|
||||||
for {
|
for {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user