Displaying 20 results from an estimated 5000 matches similar to: "popen woes"
2008 Jan 14
10
Using EventMachine to listen from non-network
I''ve actually found a way to make EventMachine listen to events from a
serial port, but only by using the pure Ruby version, using Guilliame
Pierronnet''s Ruby/SerialPort library. It turned out to be simpler
than I thought it would be:
require ''serialport''
$eventmachine_library = :pure_ruby
require ''eventmachine''
module EventMachine
class
2008 Apr 30
5
get_peername - start_server vs. connect
Hi,
On windows, get_peername works both with connections obtained
via start_server, and connections obtained via connect.
On linux, get_peername seems to only work with connections
obtained via start_server.
(I''m using svn HEAD.)
I''m wondering which is the intended behavior?
(I realize get_peername is less useful for connections obtained
via connect, since one should already
2007 Feb 26
9
libevent
Francis,
I read in the list archives back that a future EventMachine release
will support epoll on Linux (i.e., it''s in the trunk).
Better still, is there a possibility that EM will rely on libevent so
that it will be architecture independent (i.e. epoll on Linux, kqueue
on FreeBSD/Mac OS X, /dev/poll on Solaris)? This is how memcached is
implemented, and it would be helpful to be able
2007 Feb 25
6
Crash occurs where EventMachine.connect is
Hi everyone,
If you subclass EventMachine::Connection and call it outside an
EventMachine::run
event loop, EventMachine crashes! Example:
class Put < EventMachine::Connection
include EventMachine::Deferrable
HOST="localhost"
PORT=8080
def self.request(data)
EventMachine.connect(HOST, PORT, self) {|c|
c.instance_eval { @data = data }
}
end
#
2008 Jan 16
3
getsockname access
Is getsockname (or its equivalent) available to an EM Connection
object? I''d like to access the local port number in my client
application.
--Michael
2006 Jul 11
32
Database Concurrency Without a Web Server?
My Rails application requires a very busy worker process running in the
background at all times. I am launching this non-interactive process
using script/runner. This process is very busy and is communicating
with the MySQL server constantly. As I started putting some load on the
system to test, I started running into performance issues.
I have since discovered that Rails is only using 1
2008 Feb 01
6
epoll increasing latency big time
Sorry this is going to be a bit vague, but I''ve noticed something rather odd
going on with EventMachine on Linux.
I''ve written something uses EventMachine to proxy HTTP to other processes.
On OS X, it works great, adding only about 20% extra latency into the
connection when proxying versus connecting to the original backend process
directly, so a 5ms connection might now take
2008 Mar 13
0
popen pipe connection occasionally fails
Hi all,
I am encountering the following crash-causing bug using popen on occasion.
I haven''t been able to narrow it down yet, but I am curious if anyone else
has seen it or may have more information for me:
Workers::DviToPng::PipeProtocol
> terminate called after throwing an instance of ''std::runtime_error''
> what(): unable to reap subprocess
> Abort trap
2007 Nov 20
1
P2P: Avoiding manual port-forwarding
From: Tony Arcieri
>
> A STUN implementation will be an important part of DistribuStream
> in terms of firewall traversal. However, first I need to move the
> whole protocol to UDP, and before I do that I''m trying to make it
> work better in general.
>
> I''m also unsure what to use for a UDP data transfer protocol. I
> need something to work in
2006 Aug 20
14
http parser
Just thought I''d let you know that your http parser worked great for
creating an http protocol handler for Eventmachine. It wouldn''t take
that much effort to use Eventmachine for Mongrel, might be worth a
shot just to see how it does. A few things would need to be
restructered, like HttpRequest where you read the rest of the body,
and calling the handler. But it
2010 Apr 09
5
SSH Through R Script
Hi,
I am trying to SSH to a remote server through R script. In other words, I
would like to know how I can get a SSH connection to the remote server and
then execute commands on that server with the R script.
So in bash, I would normally type ssh -lusername remoteserver.com; press
enter and then wait for the password prompt to key in my password.
I have tried system("ssh
2008 Aug 06
6
Event loop responsiveness + client
Hello, on the application that I''m working on, we are using Thin.
The server implements long polling and commands that alter its internal state.
Connecting to the long poll is a very fast operation, while updating
the state of the server is a relatively slow operation.
The long poll connection is held open until there is a change to be
sent to the connection.
Here is my current
2005 Mar 12
1
popen() fread() system()
I''ve got a client who''s recently been moved onto a CentOS4 machine
from a 3.x and is writing:
"It looks like there''s one remaining problem now; at several points in the PHP
part of the dating software, C- binaries are called using popen().
The binaries work correct (tested at the command line with the proper
arguments)
The popen() retrieves the correct command
2006 Jan 05
4
Apache2 and popen
I''m running Apache2 on windows and I have a controller that issues a popen.
class FileController < ApplicationController
def index
f = IO.popen("dir")
@files = f.readlines
end
end
This works using webbrick but on Apache produces...
----------
Errno::ENOENT in File#index
No such file or directory - dir
RAILS_ROOT: C:/www/teensymud/public/../config/..
2006 Jul 13
1
Problems With IO.popen
Howdy.
I am trying to launch an external shell process from my Rails app using
IO.popen.
The process runs just fine when I am logged in as the user from the shell
but when I run it from Rails, the task doesn''t run properly and the output
is too truncated to see any errors.
Anything special I need to worry about when running shell tasks this way?
I have code like the following:
2007 Jan 17
2
Using IO.popen to capture stderr?
Hello,
I''m trying to write a utility to run an external process and capture
it''s stderr. It seems that IO.popen only lets me read the stdout. Any
tips for how to read stderr?
Mike
snippet of code...
def process_file(filename)
@filename = filename
puts "Processing: " + @filename
cmdline = "ffmpeg -i " + @filename
ffmpeg =
2002 Sep 19
1
ssh and popen-- broken pipe
Hi,
My application uses popen to execute UNIX commands. After I replace rsh
with ssh, it stopped working. I have made a test C code to reproduce the
problem as attached in this email. In the test program, I called popen for
ssh command and then pclose right away. I got the following error:
kirk 588$ a.out
Write failed flushing stdout buffer.
write stdout: Broken pipe
Any idea what is
2007 Dec 30
2
asterisk callerid
I'm missing something simple I think:
I have an spa3102 for which I want asterisk to use the incoming pstn
callerid when it sends the call to a local extension (207).
callerid works fine for the internal phones (between each other)
The spa3102 is picking up the PSTN callerid and displays it in its own
status pages
Asterisk however, doesnt see the callerid at all.
The spa3102 is set to:
2011 Mar 24
4
Remote-logging nginx? (or other non-syslog-enabled stuff)
I'm looking for suggestions as to a good general method of
remote-logging services such as nginx or anything else which doesn't
support syslog natively.
I'm aware that there's an nginx patch, and we're evaluating this. It
may be the way we fly.
However there are other tools which may not have a patch for which
remote logging would be useful. If there's a general soution
2010 Feb 02
3
Generating a PDF using popen and wkhtmltopdf
As described on wkhtmltopdf Google group
(http://code.google.com/p/wkhtmltopdf/issues/detail?id=162), I have a
problem generating a PDF while using popen and wkhtmltopdf.
wkhtmltopdf takes HTML code as input and ouputs a PDF file. Here is what
I''m doing:
command = ''"C:\Program Files\wkhtmltopdf\wkhtmltopdf.exe" - - -q''
IO.popen(command,