[#65451] [ruby-trunk - Feature #10333] [PATCH 3/1] optimize: "yoda literal" == string — ko1@...

Issue #10333 has been updated by Koichi Sasada.

9 messages 2014/10/07

[ruby-core:65515] [ruby-trunk - Feature #10090] Display of program name in process listing under AIX

From: Rei.Odaira@...
Date: 2014-10-08 08:01:52 UTC
List: ruby-core #65515
Issue #10090 has been updated by Rei Odaira.


I would like to fix this problem. It seems there is no reason this line is necessary (`missing/setproctitle.c:compat_init_setproctitle`), as Ryan pointed out:

~~~
	argv[1] = NULL;
~~~
Does anyone know why it is needed?

It is interesting that Linux's ps does not inspect the argv array, while AIX's ps does.

----------------------------------------
Feature #10090: Display of program name in process listing under AIX
https://bugs.ruby-lang.org/issues/10090#change-49290

* 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/

In This Thread

Prev Next