Skip to content

[Process] Add documentation about signal and getPid methods #2504

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 3, 2013

Conversation

romainneutron
Copy link
Contributor

Documentation for PR symfony/symfony#5476

$process = new Process('ls -lsa');
$process->start();

// do other things
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// ... do other things

@romainneutron
Copy link
Contributor Author

Hey @wouterj , thanks for the review ! I'll fix this now. Just a question : what does WCM stands for ?

@romainneutron
Copy link
Contributor Author

@wouterj I've addressed what you mentioned.

Btw, the rest of the process component docs is not compatible with what you suggested, should I open another PR to fix this ? If yes, on which branch should I do it ?

@wouterj
Copy link
Member

wouterj commented Apr 14, 2013

Just a question : what does WCM stands for ?

Waiting Code Merge. It means that this documentation should not get merged until the code is merged into the framework.

Btw, the rest of the process component docs is not compatible with what you suggested, should I open another PR to fix this ? If yes, on which branch should I do it ?

Can you please say which of my comments? I think I'll have to learn you some on-the-edge-sphinx :)

@romainneutron
Copy link
Contributor Author

:) I'm always happy to learn things !

Can you please say which of my comments? I think I'll have to learn you some on-the-edge-sphinx :)

see https://raw.github.com/symfony/symfony-docs/master/components/process.rst, none of the php blocks are prefixed with .. code-block:: php.
Your comment about replacing // do other things by // ... do other things can also be applied on current master

@romainneutron
Copy link
Contributor Author

btw, the PR is merged


Due to some limitations in PHP, if you're using signals with the Process
component, you may have to prefix your commands with `exec`_. Please read
`Symfony Issue#5769`_ and `PHP Bug#3992` to understand why this is happening.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the PHP bug number shoud be a link to the PHP issue tracker

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, all you need is adding _ to make it a link. The reference is already at the end of the file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed ! by the way, there was a typo in the bug number that I also fixed :)

@wouterj
Copy link
Member

wouterj commented Apr 14, 2013

see https://raw.github.com/symfony/symfony-docs/master/components/process.rst, none of the php blocks are prefixed with .. code-block:: php.

I'll take an example:

The :class:`Symfony\\Component\\Process\\Process` class allows you to execute
a command in a sub-process::

    use Symfony\Component\Process\Process;

    $process = new Process('ls -lsa');
    $process->run();

Do you notice the double colon at the end of the sentence before the code block? That indicates the following indented text is PHP code. Sphinx will then replace the double colon with one. So, after parsing this is rendered the same as:

The :class:`Symfony\\Component\\Process\\Process` class allows you to execute
a command in a sub-process:

.. code-block:: php

    use Symfony\Component\Process\Process;

    $process = new Process('ls -lsa');
    $process->run();

The :: is a shortcut when you already use a colon at the end of the sentence. In those cases, we prefer to use it. When your sentence doesn't end with a colon (as in this PR) you still need to use the code-block alternative.

@romainneutron
Copy link
Contributor Author

Great ! I now understand ! Thank you very much for this detailled explanation

@romainneutron
Copy link
Contributor Author

PR title updated, code has been merged

@weaverryan
Copy link
Member

Hi Romain!

I've merged this in with only minor tweaks. I also backported the "stop" method to 2.1 (without the signal argument) - it was something we were missing in the earlier version.

Thanks!

@romainneutron
Copy link
Contributor Author

I just read your tweaks, wonderful ! bravo !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants