[#65451] [ruby-trunk - Feature #10333] [PATCH 3/1] optimize: "yoda literal" == string — ko1@...
Issue #10333 has been updated by Koichi Sasada.
ko1@atdot.net wrote:
Eric Wong <normalperson@yhbt.net> wrote:
Eric Wong <normalperson@yhbt.net> wrote:
On 2014/10/09 11:04, Eric Wong wrote:
SASADA Koichi <ko1@atdot.net> wrote:
[#65453] [ruby-trunk - Feature #10328] [PATCH] make OPT_SUPPORT_JOKE a proper VM option — ko1@...
Issue #10328 has been updated by Koichi Sasada.
[#65559] is there a name for this? — Xavier Noria <fxn@...>
When describing stuff about constants (working in their guide), you often
On 2014/10/09 20:41, Xavier Noria wrote:
On Thu, Oct 9, 2014 at 1:59 PM, Nobuyoshi Nakada <nobu@ruby-lang.org> wrote:
[#65566] [ruby-trunk - Feature #10351] [Open] [PATCH] prevent CVE-2014-6277 — shyouhei@...
Issue #10351 has been reported by Shyouhei Urabe.
[#65741] Re: [ruby-cvs:55121] normal:r47971 (trunk): test/ruby/test_rubyoptions.rb: fix race — Nobuyoshi Nakada <nobu@...>
On 2014/10/16 10:10, normal@ruby-lang.org wrote:
Nobuyoshi Nakada <nobu@ruby-lang.org> wrote:
2014-10-16 12:48 GMT+09:00 Eric Wong <normalperson@yhbt.net>:
[#65753] [ruby-trunk - Feature #10333] [PATCH 3/1] optimize: "yoda literal" == string — ko1@...
Issue #10333 has been updated by Koichi Sasada.
[#65818] [ruby-trunk - Feature #10351] [PATCH] prevent CVE-2014-6277 — shyouhei@...
Issue #10351 has been updated by Shyouhei Urabe.
[ruby-core:65517] [ruby-trunk - Feature #10090] Display of program name in process listing under AIX
Issue #10090 has been updated by Rei Odaira.
Ah, I almost understood. After Process.setproctitle is called, argv[1], argv[2], etc. are no longer valid, so we must set argv[1] to NULL.
However, they should be valid until the first call to Process.setproctitle. I thinks the following patch will work. If there is no concern, I will commit this.
~~~diff
--- missing/setproctitle.c (revision 47835)
+++ missing/setproctitle.c (working copy)
@@ -74,6 +74,7 @@
static char *argv_start = NULL;
static size_t argv_env_len = 0;
static size_t argv_len = 0;
+static char **argv1_addr = NULL;
#endif
#endif /* HAVE_SETPROCTITLE */
@@ -119,7 +120,9 @@
lastenvp = envp[i] + strlen(envp[i]);
}
- argv[1] = NULL;
+ /* We keep argv[1], argv[2], etc. at this moment,
+ because the ps command of AIX refers to them. */
+ argv1_addr = &argv[1];
argv_start = argv[0];
argv_len = lastargv - argv[0];
argv_env_len = lastenvp - argv[0];
@@ -162,6 +165,8 @@
argvlen = len > argv_len ? argv_env_len : argv_len;
for(; len < argvlen; len++)
argv_start[len] = SPT_PADCHAR;
+ /* argv[1], argv[2], etc. are no longer valid. */
+ argv1_addr = NULL;
#endif
#endif /* SPT_NONE */
~~~
----------------------------------------
Feature #10090: Display of program name in process listing under AIX
https://bugs.ruby-lang.org/issues/10090#change-49292
* Author: Geoff Nichols
* Status: Third Party's Issue
* Priority: Normal
* Assignee: Yutaka Kanemoto
* Category: platform/aix
* Target version:
----------------------------------------
On AIX, the process listing (displayed with the `ps` command) for a program using Ruby 2.1.2 (or Ruby 1.9.3) shows only the Ruby interpreter path.
However, on other platforms (Linux, OS X), the process listing (for the same Ruby program) shows the Ruby interpreter path as well as the program name.
The requested default behavior is for the process listing to display the Ruby interpreter path as well as the program name on AIX.
Here's an example of the current behavior (on AIX 7.1):
~~~
# /tmp/test_script.rb &
[1] 10420428
# ps -ef | grep 10420428 | grep -v grep
root 10420428 7799016 0 05:35:10 pts/0 0:00 /usr/bin/ruby
# /usr/bin/ruby -v
ruby 2.1.2p95 (2014-05-08 revision 45877) [powerpc-aix7.1.0.0]
~~~
Here's an example of the desired behavior (on CentOS 6.5):
~~~
# /tmp/test_script.rb &
[1] 4951
# ps -ef | grep 4951 | grep -v grep
root 4951 4244 0 12:22 pts/1 00:00:00 /usr/bin/ruby /tmp/test_script.rb
# /usr/bin/ruby -v
ruby 2.1.2p95 (2014-05-08 revision 45877) [i686-linux]
~~~
Here is the test script used on both platforms:
~~~
#!/usr/bin/ruby
loop do
sleep(1)
end
~~~
--
https://bugs.ruby-lang.org/