redirecting stdin & stdout of a running process

redirecting stdin & stdout of a running process

Post by Roby Ros » Thu, 25 Jul 2002 18:16:11



Ho
How Can I redirecting stdin/stdout of running
process ?

thanx

 
 
 

redirecting stdin & stdout of a running process

Post by Donn Mille » Thu, 25 Jul 2002 19:52:02



> Ho
> How Can I redirecting stdin/stdout of running
> process ?

command < infile > outfile

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----

 
 
 

redirecting stdin & stdout of a running process

Post by Roby Ros » Thu, 25 Jul 2002 20:33:39



Quote:>> Ho
>> How Can I redirecting stdin/stdout of running
>> process ?

> command < infile > outfile

lol
i want redirect stdin &stdout of process after
execution (using pid of process )
 
 
 

redirecting stdin & stdout of a running process

Post by Edward Ned Harve » Thu, 25 Jul 2002 21:16:20




>>> Ho
>>> How Can I redirecting stdin/stdout of running
>>> process ?

>> command < infile > outfile

> lol
> i want redirect stdin &stdout of process after
> execution (using pid of process )

The file ID is stored in memory, as part of the running process.  If you
are the person programming the file, you may do it.  If you are not the
person who programmed it, then you can only find a kernel bug, exploit it
to gain access of another process's memory space, and then rewrite the
memory that belongs to the other process.

For all intents and purposes, it is impossible to redirect the stdin/stdout
of a running process.

 
 
 

redirecting stdin & stdout of a running process

Post by Mishk » Fri, 26 Jul 2002 05:50:16




>>> Ho
>>> How Can I redirecting stdin/stdout of running
>>> process ?

>> command < infile > outfile
>lol
>i want redirect stdin &stdout of process after
>execution (using pid of process )

That command have a bit of sense:
$ command < /dev/some_input > /dev/some_output 2> /dev/some_errout

where files in /dev some pseudo-devices designed for.
After doing this you can manage all in/out streams for that command.

--
BR, Mishka.

 
 
 

redirecting stdin & stdout of a running process

Post by Roby Ros » Fri, 26 Jul 2002 20:02:06



Quote:> That command have a bit of sense:
> $ command < /dev/some_input > /dev/some_output 2> /dev/some_errout
> where files in /dev some pseudo-devices designed for.
> After doing this you can manage all in/out streams for that command.

Any doc to understend how do it ?
Thanks
 
 
 

redirecting stdin & stdout of a running process

Post by wswa » Fri, 26 Jul 2002 23:41:07




> > That command have a bit of sense:
> > $ command < /dev/some_input > /dev/some_output 2> /dev/some_errout
> > where files in /dev some pseudo-devices designed for.
> > After doing this you can manage all in/out streams for that command.

> Any doc to understend how do it ?
> Thanks

You have not said what you really want this for...
But if all you want is to interact with a process then "screen" is a
good tool. It can just run in the background and you can attach to it
at any time. I use it for game servers all the time. I just want them
to run in the background unless I want to change something or there is
a problem, then I just attach to the session. It can even save a
history of the output.

-Scott

 
 
 

redirecting stdin & stdout of a running process

Post by Roby Ros » Sat, 27 Jul 2002 01:31:35



Quote:> You have not said what you really want this for...
> But if all you want is to interact with a process then "screen" is a
> good tool. It can just run in the background and you can attach to it
> at any time. I use it for game servers all the time. I just want them
> to run in the background unless I want to change something or there is
> a problem, then I just attach to the session. It can even save a
> history of the output.

I want control a program menu driven (edonkey command line)
from any tty.
Edonkey has a server mode but "controller" is a heavy java
program unlike for me.
 
 
 

redirecting stdin & stdout of a running process

Post by Ralph Sna » Sun, 28 Jul 2002 05:11:47




>> You have not said what you really want this for...
>> But if all you want is to interact with a process then "screen" is a
>> good tool. It can just run in the background and you can attach to it
>> at any time. I use it for game servers all the time. I just want them
>> to run in the background unless I want to change something or there is
>> a problem, then I just attach to the session. It can even save a
>> history of the output.

>I want control a program menu driven (edonkey command line)
>from any tty.
>Edonkey has a server mode but "controller" is a heavy java
>program unlike for me.

i'll second what the previous poster said.  "screen" is exactly
the tool you want for this job.

-rs-

 
 
 

redirecting stdin & stdout of a running process

Post by Roby Ros » Sun, 28 Jul 2002 16:17:18



Quote:> i'll second what the previous poster said.  "screen" is exactly
> the tool you want for this job.

I hope to have a success using screen. I know it but
I dont know this feature. If I understand well I just attach
to screen session.

thanx to you and Scott

 
 
 

redirecting stdin & stdout of a running process

Post by Roby Ros » Sun, 28 Jul 2002 17:57:45



Quote:> I hope to have a success using screen. I know it but
> I dont know this feature. If I understand well I just attach
> to screen session.

It's ok! screen is wonderful!
 
 
 

redirecting stdin & stdout of a running process

Post by Ralph Sna » Tue, 30 Jul 2002 09:46:25




>> I hope to have a success using screen. I know it but
>> I dont know this feature. If I understand well I just attach
>> to screen session.

>It's ok! screen is wonderful!

yes it is.  for anyone else who wants to know how to use it:

install it
run "screen"
start long-running process in the screen session
when you're done, hit ctrl-a followed by d (for detach)
later when you want to come back to it, type screen -r

it's fab.

-rs-

 
 
 

redirecting stdin & stdout of a running process

Post by wswa » Tue, 30 Jul 2002 23:47:35


You can also make it start detached wich is useful for scripts and on
startup. "-m -d" will start it detached, and with "-s" you can give it
a name that you can use to recall it later if you use screen more than
with one thing.

screen -m -d -S coolname /bin/app
screen -r coolname

-Scott

 
 
 

1. Suggestions for redirecting stdin/stdout from a running process?

I'm not a Linux/Unix expert so I was hoping someone here might be able to
help me with this.  Suppose a process is running which makes use of stdin
and stdout (it has an interactive text-based interface).  What I would like
to try and do is to make it possible for a user to login to the system, then
somehow redirect the stdout and stdin of the running process so that the
text-based UI could then be operated under the user's own login shell.  Is
this possible?  What I'm thinking is that the process could listen for a
certain signal, which would tell it to redirect it's stdout/stdin to a
different tty.  The user who logged in and wants to interact with the
process would run a script or small program to send this signal.

Any thoughts?

Thanks!

Mark

2. emptying disk drive

3. redirect stdin/stdout does not for the ftp client child process

4. nohup'd process dies when I log out

5. redirecting stdin & stdout

6. Help configuring X Windows

7. Stdin & Stdout Redirecting

8. INFORMIX-like...

9. HOW TO RE-DIRECT THE STDIN/STDOUT FOR A PROCESS RUNNING IN THE BACKGROUND

10. redirecting STDOUT of a bg process to STDOUT of a new xterm

11. Redirecting the stdout of a running process?

12. Redirecting stdout/stdin to socket

13. redirect terminal stdin/stdout