Done,
>From now on I will absolutely report any segfault, with pleasure!
2010/11/3 Laurent Sansonetti
> Hi Louis-Philippe,
>
> MacRuby should never segfault, as others indicated here. Please help us by
> filing a ticket each time you can reproduce a segfault and we will triage /
> duplicate the
Hi Louis-Philippe,
MacRuby should never segfault, as others indicated here. Please help us by
filing a ticket each time you can reproduce a segfault and we will triage /
duplicate the reports accordingly.
Thanks in advance :)
Laurent
On Nov 3, 2010, at 10:46 AM, Louis-Philippe wrote:
> Total
On Wed, 3 Nov 2010 13:46:24 -0400 Louis-Philippe
wrote:
> Totally agree Rob... but right now it seems it does segfault on
> occasions and I think some serious bugs affecting functionalities
> and RubySpecs are still in the bugbase and I wouldn't like to
> dissolve those priorities with more excep
Totally agree Rob... but right now it seems it does segfault on occasions
and I think some serious bugs affecting functionalities and RubySpecs are
still in the bugbase and I wouldn't like to dissolve those priorities with
more exception handling error... I may not understand how important this
se
I think you should still file a bug report -- MacRuby should never ever
segfault :)
___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Great! Thanks all for the answers!
I would have really liked to use backticks or open3, as they are really
easier to use, but what my example didn't show is that my subprocess will be
interactive, so in that case NSTask really seems like the way to go.
For NSTask segfault, you were right, it was
I have to respectfully agree that open3 is easier to use, however it doesn't
offer some of the more advanced features offered by NSTask.
I also found out why you are seeing a segfault, the arguments should be
passed in an array, try:
framework "foundation"
task = NSTask.launchedTaskWithLaunchPath
I respectfully disagree :)
NSTask is a huge pain and will result in dramatically more code in the simple
cases. Open3 is much easier to work with, and we can only dream of a solution
as simple as backticks in Cocoa. It becomes less of an issue if you are
executing long-running processes and d
fork() is not implemented in MacRuby, and I don't think it will be implemented
anytime in the near future because of
conflicts with the CoreFoundation framework and the Garbage Collector (as I
understand it).
The same is true for Objective-C applications.
NSTask is definitely the way to go, bu
Open3 works correctly for me. I've had tons of problems in the past using
Open3 (in ruby) with interactive commands. I think the problem is that you are
trying to run irb. The following works for me.
Open3.popen3('ls') { |stdin,stdout,stderr| puts stdout.readlines }
Backticks work as well, b
NSTask is the way to go, I used it in many cases, including some examples in my
O'Reilly book:
http://macruby.labs.oreilly.com/ch04.html#_tasks_subprocesses
You can also look at this more complex example:
https://github.com/mattetti/couchdbx-app/tree/master/macruby_version/CouchDBX/
The wrapper
Hi all,
I'm looking around MacRuby to find a way to run a subprocess and monitor
it, here is what I tried:
NSTask:
framework "foundation"
task = NSTask.launchedTaskWithLaunchPath("/bin/ls", arguments:"-l")
p task.isRunning
p task.standardOutput
=> Segmentation fault
Open4:
require 'rubygems'
12 matches
Mail list logo