Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
print(f"Toast daemon already running or /dev/pex/{daemon} not closed properly.")
sys.exit(1)
os.environ['TOASTD'] = daemon
pex_server = pex.PexServer(daemon)
fds = [yutani.yutani_ctx,pex_server]
while 1:
# Poll for events.
fd = fswait.fswait(fds,20 if sliding else 500)
if fd == 1:
size, packet = pex_server.listen()
if size and packet.size:
data = ctypes.addressof(packet) + pex.pex_packet.data.offset
notification = Notification(toast.ToastMessage.from_address(data))
notifications.append(notification)
check_close()
while yutani.yutani_ctx.query():
msg = yutani.yutani_ctx.poll()
if not yutani_mainloop.handle_event(msg):
os.unlink('/dev/pex/'+daemon)
sys.exit(0)