Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Wed Aug 10 19:29:14 CEST 2011 on sn-devel-104
|
|
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
Be more correct in load printers at startup.
If async process have already started we do not need to force a reload, but we
just need to load the printers. If other process have not finished initializing
it makes no sense to try to force them as they are masking SIGHUP unitl init is
done anyway.
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
The background queue process is repsonsible for that.
Just reload printers if necessary or wait for a message from bq to do that.
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
The cups backend forks a child to do asynchronous work.
We need a sigchld handler in bq to properly wait for the chilod to finish and
reap it, otherwise it hangs the forever as a zombie process.
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
Children were not properly receiving messages to reload printers when
the background queue process was dispatching them.
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
Children Ids must start at 1 as 0 represent the father.
Also fix callbacks that restart logs to use a procedd global variable that
holds the Id so that they work correctly both fot the parent process and the
children.
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
... until we are ready to handle it.
Also make us ready as early as possible in spoolssd.
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
This allows for setting up signal handlers earlier which is needed
for the following patch. It also simplify the code in a few places.
After all we never have more than pool active at any time during
spoolssd life span.
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
This way each child has its own log file and avoid mixing all logs form all
children in the same parent log file.
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
This way we are sure the cache is primed properly and messages can be sent to
processes if necessary as all messaging has been set up.
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
Pair-Programmed-With: Andreas Schneider <asn@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
We need to properly handle preforked children so it is better to just do that
automatically.
If the parent needs/wants to intercept SIGCHLD events it can set a callback
that will be called by the prefork code once the internal cleanup function that
checks all prefork children has been executed.
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
Use a child for the background updater process
Forward printer update messages from spoolss to background update process.
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
This way the parent doesn't need to know how to handle dead children and
keeps all of that within the prefork abstraction.
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
If this child has no clients, let the lock functions block for 1 second,
and then immediately reschedule the operation. This means we catch the lock
as soon as possible on a free child.
If, instead, we are already serving a client, we want to be non blocking,
so we timeout immediately on getting the lock, and then we sleep a 1/10th of
a second.
This means that a busy child will be slightly slower on picking up the lock,
but we won't block the existing client from communicating with us as we
immediately react to activity on the already opened file handler.
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
example:
spoolssd:prefork = 10:100:5
will configure spoolssd to start with a minimum of 10 preforked children,
a max set to 100 children and spawns/retires 5 children at a time when
ramping up/scaling down.
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
This also allows to make each children serve more than one client at the same
time if necessary.
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
This should make it more scalable and able to handle easily multiple clients at
the same time.
Signed-off-by: Andreas Schneider <asn@samba.org>
|