-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[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
Conversation
$process = new Process('ls -lsa'); | ||
$process->start(); | ||
|
||
// do other things |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// ... do other things
Hey @wouterj , thanks for the review ! I'll fix this now. Just a question : what does WCM stands for ? |
@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 ? |
Waiting Code Merge. It means that this documentation should not get merged until the code is merged into the framework.
Can you please say which of my comments? I think I'll have to learn you some on-the-edge-sphinx :) |
:) I'm always happy to learn things !
see https://raw.github.com/symfony/symfony-docs/master/components/process.rst, none of the php blocks are prefixed with |
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. |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 :)
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 |
Great ! I now understand ! Thank you very much for this detailled explanation |
PR title updated, code has been merged |
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! |
I just read your tweaks, wonderful ! bravo ! |
Documentation for PR symfony/symfony#5476