not working inside a win32-service

Hi All,

Encountered a strange phenomena with methods) in a

I am working on Apache Thrift API creation. Firstly for testing purposes
I had created a relay test server on the console(Have to cntrl C to stop

My server uses some commands to be run on it and send the output to the
client. I have implemented this with the win32-open3 gem, with which I
can capture the stdin, stdout, stderr and the pin as well and send these
across to the client.

In the relay test server, the client is able to successfully get
connected to the server, run the command and return the output. Note
that the open3 returns all the stdin, stdout and stderr in nice IO
objects. I have to “.read”(or “.gets”) them to get the actual
information inside them.

Here comes the obstacle.

Now I have created a daemon and a win32-service which runs this server
as a Windows service. The server gets started as expected. But, when the
client when tries to execute the command on the server, the server hangs

A little bit of logging pointed at the line. Somehow the infact the stdout) seems to get lost in an infinite loop
never comming out.

stdin, stdout, stderr, pid = Open3.popen3(command_to_be_executed)
error = #(IO Object)
output = #(IO Object)

Something strange is happening with the IO stuff in a win32-service.

Somebody please help me out in this. :slight_smile: