diff --git a/src/Symfony/Component/Console/Command/Command.php b/src/Symfony/Component/Console/Command/Command.php
index f4f5401c5a..bcfacfa8f3 100644
--- a/src/Symfony/Component/Console/Command/Command.php
+++ b/src/Symfony/Component/Console/Command/Command.php
@@ -213,16 +213,6 @@ class Command
*/
public function run(InputInterface $input, OutputInterface $output)
{
- if (null !== $this->processTitle) {
- if (function_exists('cli_set_process_title')) {
- cli_set_process_title($this->processTitle);
- } elseif (function_exists('setproctitle')) {
- setproctitle($this->processTitle);
- } elseif (OutputInterface::VERBOSITY_VERY_VERBOSE === $output->getVerbosity()) {
- $output->writeln('Install the proctitle PECL to be able to change the process title.');
- }
- }
-
// force the creation of the synopsis before the merge with the app definition
$this->getSynopsis();
@@ -240,6 +230,16 @@ class Command
$this->initialize($input, $output);
+ if (null !== $this->processTitle) {
+ if (function_exists('cli_set_process_title')) {
+ cli_set_process_title($this->processTitle);
+ } elseif (function_exists('setproctitle')) {
+ setproctitle($this->processTitle);
+ } elseif (OutputInterface::VERBOSITY_VERY_VERBOSE === $output->getVerbosity()) {
+ $output->writeln('Install the proctitle PECL to be able to change the process title.');
+ }
+ }
+
if ($input->isInteractive()) {
$this->interact($input, $output);
}