Re: com php-src: Fix test - on CI somebody could create a process in the meantime: ext/posix/tests/posix_kill_basic.phpt
| From: | Ferenc Kovacs | Date: | Thu, 01 May 2014 07:59:49 +0000 |
| Subject: | Re: com php-src: Fix test - on CI somebody could create a process in the meantime: ext/posix/tests/posix_kill_basic.phpt | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-77194@lists.php.net to get a copy of this message | ||
On Tue, Apr 15, 2014 at 12:44 AM, Stanislav Malyshev <stas@php.net> wrote:
> Commit: eea75e7146f437ef64d8ba980dff2d9875064a0a
> Author: Stanislav Malyshev <stas@php.net> Mon, 14 Apr 2014
> 15:43:32 -0700
> Parents: 24b72e7a277ad3b9127833c7c61bd5a8f5fee02e
> Branches: PHP-5.4 PHP-5.5 PHP-5.6 master
>
> Link:
>
> http://git.php.net/?p=php-src.git;a=commitdiff;h=eea75e7146f437ef64d8ba980dff2d9875064a0a
>
> Log:
> Fix test - on CI somebody could create a process in the meantime
>
> Changed paths:
> M ext/posix/tests/posix_kill_basic.phpt
>
>
> Diff:
> diff --git a/ext/posix/tests/posix_kill_basic.phpt
> b/ext/posix/tests/posix_kill_basic.phpt
> index c995031..b68d3cb 100644
> --- a/ext/posix/tests/posix_kill_basic.phpt
> +++ b/ext/posix/tests/posix_kill_basic.phpt
> @@ -34,6 +34,6 @@ Basic test of POSIX getpgid(), kill(), get_last_error()
> and strerror() functions
> Kill pid=%d
> bool(false)
> int(%d)
> -string(%d) %sNo such process%s
> +string(%d) %s%rNo such process|Operation not permitted%r%s
> ===DONE====
> -
> \ No newline at end of file
> +
>
>
> --
> PHP CVS Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
hi Stas,
wouldn't it be better to start a process, get it's pid, kill it, and use
that pid to try to kill it again?
as far as I can tell that would make it way less likely to have a process
with the same pid start up in the timeframe between the two kill calls.
--
Ferenc Kovács
@Tyr43l - http://tyrael.hu