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

CUPS can't launch a particular notifier more than once #1793

Closed
michaelrsweet opened this issue Jun 23, 2006 · 1 comment
Closed

CUPS can't launch a particular notifier more than once #1793

michaelrsweet opened this issue Jun 23, 2006 · 1 comment
Milestone

Comments

@michaelrsweet
Copy link
Collaborator

Version: 1.2.1
CUPS.org User: jerome.alet

If I write a very simple notifier which treats the notification then exits, the next time an event handled by this notifier happens, CUPS can't execute the notifier :

--- CUT ---
I [22/Jun/2006:23:09:35 +0200] Saving printers.conf...
d [22/Jun/2006:23:09:35 +0200] cupsdCheckJobs: 0 active jobs, sleeping=0, reload=0
D [22/Jun/2006:23:09:35 +0200] cupsd_send_notification(sub=0x80e2a30(1), event=0x80d3650(printer-added))
d [22/Jun/2006:23:09:35 +0200] start_notifier: Adding fd 11 to InputSet...
d [22/Jun/2006:23:09:35 +0200] cupsdStartProcess("/usr/lib/cups/notifier/notifier.py", 0xbfe0fbdc, 0xbfe0f894, 13, -1, 12)
D [22/Jun/2006:23:09:35 +0200] Notifier notifier.py started - PID = 32263
D [22/Jun/2006:23:09:35 +0200] sub->pipe=14
I [22/Jun/2006:23:09:35 +0200] Saving subscriptions.conf...
I [22/Jun/2006:23:09:35 +0200] New printer "Parallel_Port_1" added by "root".
D [22/Jun/2006:23:09:35 +0200] cupsdProcessIPPRequest: 8 status_code=0 (successful-ok)
...
d [22/Jun/2006:23:09:35 +0200] process_children()
D [22/Jun/2006:23:09:35 +0200] PID 32263 (/usr/lib/cups/notifier/notifier.py) exited with no errors.
...
D [22/Jun/2006:23:10:00 +0200] CUPS-Delete-Printer ipp://localhost/printers/Parallel_Port_1
d [22/Jun/2006:23:10:00 +0200] delete_printer(0x80d5dd0[8], ipp://localhost/printers/Parallel_Port_1)
d [22/Jun/2006:23:10:00 +0200] cupsdFindPolicyOp(p=0x80a14b0, op=4004(CUPS-Delete-Printer))
d [22/Jun/2006:23:10:00 +0200] cupsdFindPolicyOp: Found exact match...
d [22/Jun/2006:23:10:00 +0200] cupsdIsAuthorized: con->uri="/admin/", con->best=0x80a8540((null))
d [22/Jun/2006:23:10:00 +0200] cupsdIsAuthorized: level=AUTH_USER, type=AUTH_BASIC, satisfy=AUTH_SATISFY_ALL, num_names=1
d [22/Jun/2006:23:10:00 +0200] cupsdIsAuthorized: op=4004(CUPS-Delete-Printer)
d [22/Jun/2006:23:10:00 +0200] cupsdIsAuthorized: auth=AUTH_ALLOW...
d [22/Jun/2006:23:10:00 +0200] cupsdIsAuthorized: username="root"
d [22/Jun/2006:23:10:00 +0200] cupsdCheckJobs: 0 active jobs, sleeping=0, reload=0
D [22/Jun/2006:23:10:00 +0200] cupsd_send_notification(sub=0x80e2a30(1), event=0x80f3688(printer-deleted))
D [22/Jun/2006:23:10:00 +0200] sub->pipe=14
E [22/Jun/2006:23:10:00 +0200] Unable to send event for subscription 1 (notifier.py:coucou)!
I [22/Jun/2006:23:10:00 +0200] Saving subscriptions.conf...
I [22/Jun/2006:23:10:00 +0200] Printer "Parallel_Port_1" deleted by "root".
--- CUT ---

From CUPS 1.2.1-2 (Debian standard package) web interface, I've
first added a printer.

My own notifier was launched, and exited successfully.

Then from the web interface I deleted the printer.

Then CUPS was unable to restart the notifier.

The pipe object should have been closed but wasn't it seems.

My subscriptions.conf follows :

--- CUT ---

Subscription configuration file for CUPS v1.2.1

Written by cupsd on 2006-06-22 23:11

NextSubscriptionId 2
<Subscription 1>
Events printer-added printer-deleted
Owner pykota
Recipient notifier.py:coucou
LeaseDuration 0
Interval 0
ExpirationTime 0
NextEventId 18

--- CUT ---

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

Fixed in Subversion repository.

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

No branches or pull requests

1 participant