[process][darwin] Remove Groups() as it's non-functional

pull/989/head
Lomanic 5 years ago
parent 64e16cc8c3
commit 148a662b06

@ -212,17 +212,18 @@ func (p *Process) GidsWithContext(ctx context.Context) ([]int32, error) {
}
func (p *Process) GroupsWithContext(ctx context.Context) ([]int32, error) {
k, err := p.getKProc()
if err != nil {
return nil, err
}
return nil, common.ErrNotImplementedError
// k, err := p.getKProc()
// if err != nil {
// return nil, err
// }
groups := make([]int32, k.Eproc.Ucred.Ngroups)
for i := int16(0); i < k.Eproc.Ucred.Ngroups; i++ {
groups[i] = int32(k.Eproc.Ucred.Groups[i])
}
// groups := make([]int32, k.Eproc.Ucred.Ngroups)
// for i := int16(0); i < k.Eproc.Ucred.Ngroups; i++ {
// groups[i] = int32(k.Eproc.Ucred.Groups[i])
// }
return groups, nil
// return groups, nil
}
func (p *Process) TerminalWithContext(ctx context.Context) (string, error) {

@ -212,17 +212,18 @@ func (p *Process) GidsWithContext(ctx context.Context) ([]int32, error) {
}
func (p *Process) GroupsWithContext(ctx context.Context) ([]int32, error) {
k, err := p.getKProc()
if err != nil {
return nil, err
}
return nil, common.ErrNotImplementedError
// k, err := p.getKProc()
// if err != nil {
// return nil, err
// }
groups := make([]int32, k.Eproc.Ucred.Ngroups)
for i := int16(0); i < k.Eproc.Ucred.Ngroups; i++ {
groups[i] = int32(k.Eproc.Ucred.Groups[i])
}
// groups := make([]int32, k.Eproc.Ucred.Ngroups)
// for i := int16(0); i < k.Eproc.Ucred.Ngroups; i++ {
// groups[i] = int32(k.Eproc.Ucred.Groups[i])
// }
return groups, nil
// return groups, nil
}
func (p *Process) TerminalWithContext(ctx context.Context) (string, error) {

Loading…
Cancel
Save