From: "Raúl Gutiérrez Segalés" Date: 2012-08-25T02:26:24+09:00 Subject: Re: Is calling system() from a thread suppose to be safe? Hi Robert, On 24 August 2012 01:18, Robert Klemme wrote: > On Fri, Aug 24, 2012 at 6:04 AM, wrote: >> Hey there, >> >> I am calling system() from a thread and getting: >> >> `system': no implicit conversion from nil to integer (TypeError) >> from wifi-state-observer:169:in `vpn_down' >> from wifi-state-observer:46:in `block in run' >> from wifi-state-observer:54:in `call' >> from wifi-state-observer:54:in `run' >> from wifi-state-observer:54:in `run' >> from wifi-state-observer:270:in `
' >> >> Looking at Ruby's source: > > Can we first look at your call to system and surrounding code? > Sure, here is the full-script: http://www.itevenworks.net/~rgs/ruby/wifi-state-observer system() happens inside vpn_down(). As you can see the main thread is glib2 loop and the other forks/execs a binary (that connects to a vpn). Cheers, - rgs