mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-24 19:06:44 +00:00
GODT-2039: bridge monitors bridge-gui via its PID.
This commit is contained in:
committed by
Romain LE JEUNE
parent
f5148074fd
commit
3b9a3aaad2
@ -76,6 +76,7 @@ const (
|
||||
flagRestart = "restart"
|
||||
FlagLauncher = "launcher"
|
||||
FlagNoWindow = "no-window"
|
||||
FlagParentPID = "parent-pid"
|
||||
)
|
||||
|
||||
type Base struct {
|
||||
@ -324,6 +325,12 @@ func (b *Base) NewApp(mainLoop func(*Base, *cli.Context) error) *cli.App {
|
||||
Usage: "The launcher to use to restart the application",
|
||||
Hidden: true,
|
||||
},
|
||||
&cli.IntFlag{
|
||||
Name: FlagParentPID,
|
||||
Usage: "The PID of the process that started the application. Ignored if frontend is not gRPC",
|
||||
Hidden: true,
|
||||
Value: -1,
|
||||
},
|
||||
}
|
||||
|
||||
return app
|
||||
|
||||
@ -86,6 +86,7 @@ func main(b *base.Base, c *cli.Context) error { //nolint:funlen
|
||||
b.Updater,
|
||||
b,
|
||||
b.Locations,
|
||||
c.Int(base.FlagParentPID),
|
||||
)
|
||||
|
||||
cache, cacheErr := loadMessageCache(b)
|
||||
|
||||
Reference in New Issue
Block a user