Age | Commit message (Collapse) | Author | Files | Lines |
|
metze
|
|
metze
|
|
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Aug 12 16:46:43 CEST 2011 on sn-devel-104
|
|
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Aug 12 12:36:03 CEST 2011 on sn-devel-104
|
|
in cli_smb_received()
Callers of tevent_req_done() (or similar functions) have to return directly.
Otherwise the callback could invalidate the current stack state,
which is likely to trigger segfaults.
If there was only one pending request and we just got the response
for that one, we can use tevent_req_done() directly.
Otherwise there're more pending requests and we need to call
cli_state_receive_next() or we got the response for chained requests.
Both means that we have to use tevent_req_defer_callback().
metze
|
|
metze
|
|
It's up to the caller to notify the current request,
but we have to notify all other pending requests if
we're not able to read the next response from the server.
metze
|
|
metze
|
|
metze
|
|
for chained requests
metze
|
|
metze
|
|
If we got a problem on the connection we need to notify every
pending request. But we need to make use of tevent_req_defer_callback()
before tevent_req_nterror(), otherwise the callback, triggered
by tevent_req_nterror(), could invalidate the state of current caller,
which will likely cause segfaults.
metze
|
|
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Aug 12 09:37:04 CEST 2011 on sn-devel-104
|
|
Signed-off-by: Andreas Schneider <asn@samba.org>
Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Thu Aug 11 17:09:30 CEST 2011 on sn-devel-104
|
|
smbd is not the only daemon interested in smb.conf changes. Move this
message to the GENERAL class so that all interested partied (nmbd,
winbindd, spoolssd, etc..) can receive this notification.
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
This has been broken since ff0ac5b0 (May 2007).
Basically all messages were belonging to the General class except for CTDB
messages.
This fixed the message_send_all() function to correctly compute the class, and
fixes registrations to include all they need to cope with the fact not all
messages are of calss general (registrations rotted a bit because as long as
FLAG_MSG_GENERAL was defined the process woould receive all messages).
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
The FLAG_MSG_PRINT_NOTIFY class is actually obsolete and never used, as the
only message belonging to it is not used either.
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
system libs exist
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Thu Aug 11 13:26:27 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>
|
|
This way we can act when a client disconnects.
Signed-off-by: Andreas Schneider <asn@samba.org>
|