Redirecting stdin through a FIFO

I'm running a server app (written in Java) under GNU/Linux which takes input (from stdin, I guess) and interprets it to run some commands. I dont want to run the app inside a terminal window (I'd like to run a daemon), but I'd still like to be able to input commands whenever I want to. I thought I might be able to do that using fifos, so I created it using mknod. The problem is cat fifofile > java... and cat fifofile | java ... fail with a "file not found" error for some reason.

Using only cat to read and write and the fifo works flawlessly.

Is there any way to fix this, or any other way to achieve the same goal?


So, Minecraft? The best way to do this is to have a bona-fide tty for the console part of the application. screen is an easy way to do that.

Have you tried java < fifofile? What about something like exec 3<&0; exec 0<fifofile; java?

What shell are you using? You might be able to use process substitution or coprocesses if you're using a shell that supports them.

Need Your Help

jquery lightbox plugin: Bug on IE7 and IE8!

jquery internet-explorer-8 internet-explorer-7 lightbox

I wonder if anyone has used this lightbox plugin and encountered a bug on IE &lt; 9 ?

How to connect oracle database remotely from a ASP.Net application

c# oracle nhibernate

I have two PC. In one pc(PC1) i have installed oracle express edition 10g ( as far as i know). And in another(PC2) i have installed visual studio 2008 sp1. In PC2 the ASP.Net

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.