$? is always new?

Is the following expected?

$ irb

$?

=> #<Process::Status: pid 20110 exit 0>

$?

=> #<Process::Status: pid 20122 exit 0>

$?

=> #<Process::Status: pid 20134 exit 0>

What are those phantom processes?
-r

···

--
Posted via http://www.ruby-forum.com/.

Roger Pack wrote:

Is the following expected?

$ irb

$?

=> #<Process::Status: pid 20110 exit 0>

$?

=> #<Process::Status: pid 20122 exit 0>

$?

=> #<Process::Status: pid 20134 exit 0>

What are those phantom processes?
-r

What platform are you on? What ruby version? For me, with ruby
1.8.7.249-2 standard package from Ubuntu Lucid amd64:

$ irb
irb(main):001:0> $?
=> nil
irb(main):002:0> $?
=> nil
irb(main):003:0> $?
=> nil
irb(main):004:0> RUBY_VERSION
=> "1.8.7"

···

--
Posted via http://www.ruby-forum.com/.

$?

=> #<Process::Status: pid 20122 exit 0>

$?

=> #<Process::Status: pid 20134 exit 0>

What are those phantom processes?
-r

What platform are you on? What ruby version? For me, with ruby
1.8.7.249-2 standard package from Ubuntu Lucid amd64:

$ irb
irb(main):001:0> $?
=> nil

On windows it appears to behave as expected.

On linux (Ubuntu, I believe latest revision).

All built from source:

[25:1557][rdp@ilab1:~]$ ruby -v
ruby 1.9.1p243 (2009-07-16 revision 24175) [i686-linux]
[25:1557][rdp@ilab1:~]$ export RUBYOPT=
[25:1558][rdp@ilab1:~]$ irb
irb(main):001:0> $?
=> #<Process::Status: pid 21719 exit 0>
irb(main):002:0> $?
=> #<Process::Status: pid 21731 exit 0>
irb(main):003:0> $?
=> #<Process::Status: pid 21743 exit 0>
irb(main):004:0> exit
[25:1558][rdp@ilab1:~]$ ~/installs/ruby-1.8.7-p174_installed/bin/irb
irb(main):001:0> $?
=> #<Process::Status: pid=21771,exited(0)>
irb(main):002:0> $?
=> #<Process::Status: pid=21778,exited(0)>
irb(main):003:0> $?
=> #<Process::Status: pid=21785,exited(0)>

···

--
Posted via http://www.ruby-forum.com/.

Roger Pack wrote:

[25:1558][rdp@ilab1:~]$ irb
irb(main):001:0> $?
=> #<Process::Status: pid 21719 exit 0>
irb(main):002:0> $?
=> #<Process::Status: pid 21731 exit 0>

Is there something in your .irbrc that is firing off processes?

Linux or Windows, all the versions return nil when asked.

Seems there is a thread you're running with your irb session that
might be spawning a lot.

···

On Jun 25, 6:00 pm, Roger Pack <rogerpack2...@gmail.com> wrote:

>>>> $?
>> => #<Process::Status: pid 20122 exit 0>
>>>> $?
>> => #<Process::Status: pid 20134 exit 0>

>> What are those phantom processes?
>> -r

> What platform are you on? What ruby version? For me, with ruby
> 1.8.7.249-2 standard package from Ubuntu Lucid amd64:

> $ irb
> irb(main):001:0> $?
> => nil

On windows it appears to behave as expected.

On linux (Ubuntu, I believe latest revision).

All built from source:

[25:1557][rdp@ilab1:~]$ ruby -v
ruby 1.9.1p243 (2009-07-16 revision 24175) [i686-linux]
[25:1557][rdp@ilab1:~]$ export RUBYOPT=
[25:1558][rdp@ilab1:~]$ irb
irb(main):001:0> $?
=> #<Process::Status: pid 21719 exit 0>
irb(main):002:0> $?
=> #<Process::Status: pid 21731 exit 0>
irb(main):003:0> $?
=> #<Process::Status: pid 21743 exit 0>
irb(main):004:0> exit
[25:1558][rdp@ilab1:~]$ ~/installs/ruby-1.8.7-p174_installed/bin/irb
irb(main):001:0> $?
=> #<Process::Status: pid=21771,exited(0)>
irb(main):002:0> $?
=> #<Process::Status: pid=21778,exited(0)>
irb(main):003:0> $?
=> #<Process::Status: pid=21785,exited(0)>

--
Luis Lavena

It could be associated with rb-readline, but under my system it
doesn't spawn more than once:

:\Users\Luis>irb
irb(main):001:0> $?
=> #<Process::Status: pid=3464,exited(0)>
irb(main):002:0> $?
=> #<Process::Status: pid=3464,exited(0)>
irb(main):003:0> $?
=> #<Process::Status: pid=3464,exited(0)>
irb(main):004:0> $?
=> #<Process::Status: pid=3464,exited(0)>

···

On Jun 25, 8:33 pm, Luis Lavena <luislav...@gmail.com> wrote:

On Jun 25, 6:00 pm, Roger Pack <rogerpack2...@gmail.com> wrote:

> >>>> $?
> >> => #<Process::Status: pid 20122 exit 0>
> >>>> $?
> >> => #<Process::Status: pid 20134 exit 0>

> >> What are those phantom processes?
> >> -r

> > What platform are you on? What ruby version? For me, with ruby
> > 1.8.7.249-2 standard package from Ubuntu Lucid amd64:

> > $ irb
> > irb(main):001:0> $?
> > => nil

> On windows it appears to behave as expected.

> On linux (Ubuntu, I believe latest revision).

> All built from source:

> [25:1557][rdp@ilab1:~]$ ruby -v
> ruby 1.9.1p243 (2009-07-16 revision 24175) [i686-linux]
> [25:1557][rdp@ilab1:~]$ export RUBYOPT=
> [25:1558][rdp@ilab1:~]$ irb
> irb(main):001:0> $?
> => #<Process::Status: pid 21719 exit 0>
> irb(main):002:0> $?
> => #<Process::Status: pid 21731 exit 0>
> irb(main):003:0> $?
> => #<Process::Status: pid 21743 exit 0>
> irb(main):004:0> exit
> [25:1558][rdp@ilab1:~]$ ~/installs/ruby-1.8.7-p174_installed/bin/irb
> irb(main):001:0> $?
> => #<Process::Status: pid=21771,exited(0)>
> irb(main):002:0> $?
> => #<Process::Status: pid=21778,exited(0)>
> irb(main):003:0> $?
> => #<Process::Status: pid=21785,exited(0)>

Linux or Windows, all the versions return nil when asked.

Seems there is a thread you're running with your irb session that
might be spawning a lot.

--
Luis Lavena

Seems there is a thread you're running with your irb session that
might be spawning a lot.

It could be associated with rb-readline, but under my system it
doesn't spawn more than once:

Interesting. I think that's it...

possibly from this line:

#0:/home/rdp/installs/ruby-1.9.1-p243_gc/lib/ruby/site_ruby/1.9.1/rbreadline.rb:6834:Kernel:>:

@readline_echoing_p = (`stty -a`.scan(/-*echo\b/).first == 'echo')

Thanks for the tip!
-r

···

--
Posted via http://www.ruby-forum.com/.