MySQL 8.3.0
Source Code Documentation
mysqld_daemon.h
Go to the documentation of this file.
1/* Copyright (c) 2015, 2023, Oracle and/or its affiliates.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6
7 This program is also distributed with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have included with MySQL.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License, version 2.0, for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22
23#ifndef MYSQLD_DAEMON_INCLUDED
24#define MYSQLD_DAEMON_INCLUDED
25
26namespace mysqld {
27namespace runtime {
28bool is_daemon();
29/**
30 Daemonize mysqld.
31
32 This function does sysv style of daemonization of mysqld.
33
34 @retval fd In daemon; file descriptor for the write end of the status pipe.
35 @retval -1 In parent, if successful.
36 @retval -2 In parent, in case of errors.
37 */
39void signal_parent(int pipe_write_fd, char status);
40} // namespace runtime
41} // namespace mysqld
42#endif // MYSQLD_DAEMON_INCLUDED
static int pipe_write_fd
Definition: mysqld.cc:1164
void signal_parent(int pipe_write_fd, char status)
Signal parent to exit.
Definition: mysqld_daemon.cc:144
bool is_daemon()
Prediacate to test if we're currently executing in the daemon process.
Definition: mysqld_daemon.cc:53
int mysqld_daemonize()
Daemonize mysqld.
Definition: mysqld_daemon.cc:55
Definition: mysqld_daemon.h:26
required uint32 status
Definition: replication_asynchronous_connection_failover.proto:60