MySQL 8.0.39
Source Code Documentation
mysqld::runtime Namespace Reference

Functions

bool is_daemon ()
 Prediacate to test if we're currently executing in the daemon process. More...
 
int mysqld_daemonize ()
 Daemonize mysqld. More...
 
void signal_parent (int pipe_write_fd, char status)
 Signal parent to exit. More...
 

Function Documentation

◆ is_daemon()

bool mysqld::runtime::is_daemon ( )

Prediacate to test if we're currently executing in the daemon process.

Return values
trueif this is the daemon
falseotherwise

◆ mysqld_daemonize()

int mysqld::runtime::mysqld_daemonize ( )

Daemonize mysqld.

This function does sysv style of daemonization of mysqld.

Return values
fdIn daemon; file descriptor for the write end of the status pipe.
-1In parent, if successful.
-2In parent, in case of errors.

◆ signal_parent()

void mysqld::runtime::signal_parent ( int  pipe_write_fd,
char  status 
)

Signal parent to exit.

Parameters
pipe_write_fdFile Descriptor of write end of pipe.
statusstatus of the initialization done by grand child. 1 means initialization complete and the server is ready to accept client connections. 0 means initialization aborted due to some failure.
Note
This function writes the status to write end of pipe. This notifies the parent which is block on read end of pipe.