Mixlib-shellout is there way we can associate standard error/out to /dev/console or /dev/ttys

mixlib-shellout is there way we can associate standard error/out to /dev/console or /dev/ttys

Currently, if I use mixlib-shellout and spawn a process it associate the error/out to PIPE as per the process file descriptors. I have one use case where I expect the command that I invoke via mixlib-shellout to write the error and out say /dev/console.

Hi Ksushil,

This may solve your problem - have you looked at “fancy execute” resource?

I had tried execute with live_stream TrueClass. That doesn’t seem to fix my problem.

Even with live_stream, the descriptors are coming as follows and at some point the application which I am trying to start with mixlib-shellout print any error/out on its 1,2 description program goes exited with EPIPE.

[root@host fd]# ll
total 0
lr-x------ 1 john users 64 May 19 14:36 0 -> /dev/null
l-wx------ 1 john users 64 May 19 14:36 1 -> pipe:[1912373138]
l-wx------ 1 john users 64 May 19 14:36 2 -> pipe:[1912373139]
lr-x------ 1 john users 64 May 19 14:36 3 -> pipe:[1912373397]
l-wx------ 1 john users 64 May 19 14:36 4 -> /var/log/appserver/app_component.2016-05-19-14.log
lr-x------ 1 john users 64 May 19 14:36 5 -> pipe:[1912373398]

Whereas I start the same application using system() it doesn’t crash later point. Because 1,2 get linked to either console/ttys and app doesn’t get to EPIPE state. Using system() it works, but since I use a foodcritic compliant code, i would like to use Mixlib-Shellout and work it out to avoid [‘FC048’] error from foodcritic.