X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Fmysql.php;h=9424402cdfc105302cba4f3e5e27483393eac4b2;hb=74d04edec385aa86ee01943b9a27475d79f74e78;hp=6d0882a64aa759d85a40787e8973cccb7637efe1;hpb=e9ed100496b388a31ac2af0deabcc9754984d09d;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/mysql.php b/maintenance/mysql.php index 6d0882a64a..9424402cdf 100644 --- a/maintenance/mysql.php +++ b/maintenance/mysql.php @@ -106,9 +106,9 @@ class MysqlMaintenance extends Maintenance { * Run the mysql client for the given server info * * @param array $info - * @param string|false The DB name, or false to use the main wiki DB + * @param string|false $dbName The DB name, or false to use the main wiki DB * - * @return The desired exit status + * @return int The desired exit status */ private function runMysql( $info, $dbName ) { // Write the password to an option file to avoid disclosing it to other @@ -165,6 +165,12 @@ class MysqlMaintenance extends Maintenance { $args = array_merge( $args, $this->mArgs ); + // Ignore SIGINT if possible, otherwise the wrapper terminates when the user presses + // ctrl-C to kill a query. + if ( function_exists( 'pcntl_signal' ) ) { + pcntl_signal( SIGINT, SIG_IGN ); + } + $pipes = []; $proc = proc_open( Shell::escape( $args ), $desc, $pipes ); if ( $proc === false ) {