[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Redirection of Standard Input?

From: Greg Novak
Subject: Re: Redirection of Standard Input?
Date: Tue, 10 Jun 2008 09:18:03 -0700

I have a long-running daemon process that I start with screen so that
I can occasionally connect to and converse with it.  However, I'd also
occasionally like to converse with the server process via shell
scripts.  I'd like to do something like this:

echo "some commands" | screen -r my_server_process

That is, I want screen to connect and then allow the text "some
commands" to tumble down the server process's stdin exactly as if I'd
typed it with my fingers.  Then screen should disconnect and leave the
server process be.  I don't care what happens to stdout---it can be
connected to /dev/null.  However, I would like the input and output to
show up in the log file.

I realize that screen expects to have an interactive user at one end
of its connection, and therefore I'm in some sense misusing the
program.  I'm accustomed to using detachtty
( for this, which does allow the above
use case.  However, I've had trouble getting detachtty to work on OS X
10.4 or 10.5 on PPC machines.

Thanks for any suggestions,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]