summaryrefslogtreecommitdiff
path: root/source3/printing
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2021-04-23 16:03:57 +0200
committerAndreas Schneider <asn@cryptomilk.org>2021-04-27 13:24:35 +0000
commit3ba5ed73fcf40b4e18ae84c272188849449586fe (patch)
tree24296cf9b7a67cbdfe2f9cc64b4bc89b959fe228 /source3/printing
parent2e2426e51576aae6211950b25aaacdd97815b111 (diff)
downloadsamba-3ba5ed73fcf40b4e18ae84c272188849449586fe.tar.gz
printing: Remove the pause_pipe[] from queue_process.c
Since c80f70390c37 we don't need this explicit pipe anymore. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3/printing')
-rw-r--r--source3/printing/queue_process.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/source3/printing/queue_process.c b/source3/printing/queue_process.c
index 3cd53d8f39d..a4f49d01508 100644
--- a/source3/printing/queue_process.c
+++ b/source3/printing/queue_process.c
@@ -302,18 +302,6 @@ static void bq_smb_conf_updated(struct messaging_context *msg_ctx,
printing_subsystem_queue_tasks(state);
}
-static void printing_pause_fd_handler(struct tevent_context *ev,
- struct tevent_fd *fde,
- uint16_t flags,
- void *private_data)
-{
- /*
- * If pause_pipe[1] is closed it means the parent smbd
- * and children exited or aborted.
- */
- exit_server_cleanly(NULL);
-}
-
/****************************************************************************
main thread of the background lpq updater
****************************************************************************/
@@ -324,19 +312,8 @@ pid_t start_background_queue(struct tevent_context *ev,
pid_t pid;
struct bq_state *state;
- /* Use local variables for this as we don't
- * need to save the parent side of this, just
- * ensure it closes when the process exits.
- */
- int pause_pipe[2];
-
DEBUG(3,("start_background_queue: Starting background LPQ thread\n"));
- if (pipe(pause_pipe) == -1) {
- DEBUG(5,("start_background_queue: cannot create pipe. %s\n", strerror(errno) ));
- exit(1);
- }
-
/*
* Block signals before forking child as it will have to
* set its own handlers. Child will re-enable SIGHUP as
@@ -361,16 +338,12 @@ pid_t start_background_queue(struct tevent_context *ev,
}
if (pid == 0) {
- struct tevent_fd *fde;
int ret;
NTSTATUS status;
/* Child. */
DEBUG(5,("start_background_queue: background LPQ thread started\n"));
- close(pause_pipe[0]);
- pause_pipe[0] = -1;
-
status = smbd_reinit_after_fork(msg_ctx, ev, true, "lpqd");
if (!NT_STATUS_IS_OK(status)) {
@@ -410,14 +383,6 @@ pid_t start_background_queue(struct tevent_context *ev,
messaging_register(msg_ctx, NULL, MSG_PRINTER_DRVUPGRADE,
do_drv_upgrade_printer);
- fde = tevent_add_fd(ev, ev, pause_pipe[1], TEVENT_FD_READ,
- printing_pause_fd_handler,
- NULL);
- if (!fde) {
- DEBUG(0,("tevent_add_fd() failed for pause_pipe\n"));
- smb_panic("tevent_add_fd() failed for pause_pipe");
- }
-
pcap_cache_reload(ev, msg_ctx, reload_pcap_change_notify);
DEBUG(5,("start_background_queue: background LPQ thread waiting for messages\n"));
@@ -428,8 +393,6 @@ pid_t start_background_queue(struct tevent_context *ev,
exit(1);
}
- close(pause_pipe[1]);
-
return pid;
}