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
|
||||
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 core binary
|
||||
### Service
|
||||
### Cron
|
||||
|
|
|
@ -94,13 +94,13 @@ func pidProxy(cmd *cobra.Command, args []string) error {
|
|||
err error
|
||||
pid int
|
||||
sc chan os.Signal
|
||||
t *time.Timer
|
||||
t *time.Ticker
|
||||
)
|
||||
|
||||
sc = make(chan os.Signal, 1)
|
||||
signal.Notify(sc, unix.SIGTERM)
|
||||
|
||||
t = time.NewTimer(time.Second)
|
||||
t = time.NewTicker(time.Second)
|
||||
|
||||
check:
|
||||
for {
|
||||
|
|
Loading…
Reference in New Issue