Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no response frpm method #109

Open
akaJes opened this issue May 18, 2022 · 1 comment
Open

no response frpm method #109

akaJes opened this issue May 18, 2022 · 1 comment

Comments

@akaJes
Copy link

akaJes commented May 18, 2022

Linux jes-MS-7680 5.15.0-27-generic #28-Ubuntu SMP Thu Apr 14 04:55:28 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04 LTS
Release: 22.04
Codename: jammy

"dbus-next": "^0.10.2"

const dbus = require('dbus-next')
const bus = dbus.systemBus()

const addWorking = () =>
  bus.getProxyObject('org.freedesktop.login1', '/org/freedesktop/login1')
  .then(obj => obj.getInterface('org.freedesktop.login1.Manager')
      .Inhibit('sleep', 'who', 'services working', 'block')
//      .ListInhibitors()
  )
addWorking().then(console.log).then(a=> bus.disconnect())

list works good
but Inhibut stucks with no response
expected result is file descriptor
https://www.freedesktop.org/wiki/Software/systemd/inhibit/

@taoky
Copy link

taoky commented Dec 31, 2024

usocket dependency is required to correctly handle methods returning Unix FD, otherwise dbus-next could never resolve or reject the promise returned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants