[cups] Custom backend with fork()
msweet at apple.com
Wed Apr 29 05:51:39 PDT 2015
You'll need to separate the child from the process group, otherwise the child will hold up the parent from exiting.
"man setpgid" and "man setsid"...
> On Apr 28, 2015, at 4:01 PM, Justin Killen <jkillen at allamericanasphalt.com> wrote:
> I'm trying to emulate a system that passes job control via lpr/lpd. I've got the basics worked out, but I'm getting held up by jobs only running one at a time. Ideally, what should happen is that if 10 jobs are queued, they should all run in parallel. In the legacy system (an AIX box), it was accomplished by the backend script fork()ing, and the parent returning, which caused the print queue entry to be 'complete' and it would go to the next one. I tried this strategy with CUPS, but it doesn't work -the backend script forks and the parent returns, but CUPS still waits for the child PID to complete before moving on to the next item on the queue. Perhaps CUPS is monitoring the entire process tree? Anyway, any ideas or thoughts would be welcomed.
> cups mailing list
> cups at cups.org
Michael Sweet, Senior Printing System Engineer, PWG Chair
More information about the cups