helper/bwrap: append --sync-fd before --
Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
parent
b31d055e20
commit
715addaccd
@ -49,6 +49,11 @@ func (b *bubblewrap) StartNotify(ready chan error) error {
|
|||||||
return errors.New("exec: already started")
|
return errors.New("exec: already started")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// pass sync fd to bwrap
|
||||||
|
if b.sync != nil {
|
||||||
|
b.Cmd.Args = append(b.Cmd.Args, "--sync-fd", strconv.Itoa(int(proc.ExtraFile(b.Cmd, b.sync))))
|
||||||
|
}
|
||||||
|
|
||||||
// prepare bwrap pipe and args
|
// prepare bwrap pipe and args
|
||||||
if argsFD, _, err := b.control.prepareCmd(b.Cmd); err != nil {
|
if argsFD, _, err := b.control.prepareCmd(b.Cmd); err != nil {
|
||||||
return err
|
return err
|
||||||
@ -76,10 +81,6 @@ func (b *bubblewrap) StartNotify(ready chan error) error {
|
|||||||
b.Cmd.Env = append(b.Cmd.Env, FortifyHelper+"=1", FortifyStatus+"=-1")
|
b.Cmd.Env = append(b.Cmd.Env, FortifyHelper+"=1", FortifyStatus+"=-1")
|
||||||
}
|
}
|
||||||
|
|
||||||
if b.sync != nil {
|
|
||||||
b.Cmd.Args = append(b.Cmd.Args, "--sync-fd", strconv.Itoa(int(proc.ExtraFile(b.Cmd, b.sync))))
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := b.Cmd.Start(); err != nil {
|
if err := b.Cmd.Start(); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user