[Ilugc] attach a process to terminal

2009-04-07 Thread Ashish Verma
Hi,

I had started a rsync process in the bg and then happened to close that
terminal. Now that process shows a S status in ps and is not working.

>From what I found out, this is because the process has been disconnected
from the terminal that started it. I could not locate a way to attach it to
some other terminal and restart it. Is there a way to do this. I mean can
the process be restarted in any way or connected to another terminal?

Regards,
Ashish
___
To unsubscribe, email ilugc-requ...@ae.iitm.ac.in with 
"unsubscribe  "
in the subject or body of the message.  
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] attach a process to terminal

2009-04-07 Thread Kenneth Gonsalves
On Tuesday 07 April 2009 15:07:44 Ashish Verma wrote:
> I had started a rsync process in the bg and then happened to close that
> terminal. Now that process shows a S status in ps and is not working.
>
> >From what I found out, this is because the process has been disconnected
>
> from the terminal that started it. I could not locate a way to attach it to
> some other terminal and restart it. Is there a way to do this. I mean can
> the process be restarted in any way or connected to another terminal?

you could use screen
-- 
regards
kg
http://lawgon.livejournal.com
___
To unsubscribe, email ilugc-requ...@ae.iitm.ac.in with 
"unsubscribe  "
in the subject or body of the message.  
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] attach a process to terminal

2009-04-07 Thread Ashish Verma
>
>
>
> you could use screen
> --
> regards
> kg
>  


But then, the process should have been started in screen. I started it
directly in a pty and closed that pty.

Is there no way to restart it without reattaching it. Or opening a new pty
which is now of the same number as the closed one and doing something to
attach the process to the new pty.

Regards,
Ashish
___
To unsubscribe, email ilugc-requ...@ae.iitm.ac.in with 
"unsubscribe  "
in the subject or body of the message.  
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] attach a process to terminal

2009-04-07 Thread Joe Steeve
Kenneth Gonsalves  writes:
>> from the terminal that started it. I could not locate a way to
>> attach it to some other terminal and restart it. Is there a way
>> to do this. I mean can the process be restarted in any way or
>> connected to another terminal?
>
> you could use screen

The process has to be started in screen in order to re-attach.

-- 
.o. I'm a Free man. I use Free Software.
..o
ooo http://www.joesteeve.org/


pgpsBgqDwFGHo.pgp
Description: PGP signature
___
To unsubscribe, email ilugc-requ...@ae.iitm.ac.in with 
"unsubscribe  "
in the subject or body of the message.  
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] attach a process to terminal

2009-04-07 Thread Raman.P

--- On Tue, 7/4/09, Ashish Verma  wrote:

 
> I had started a rsync process in the bg and then happened
> to close that
> terminal. Now that process shows a S status in ps and is
> not working.
> 
> >From what I found out, this is because the process has
> been disconnected
> from the terminal that started it. I could not locate a way
> to attach it to
> some other terminal and restart it. Is there a way to do
> this. I mean can
> the process be restarted in any way or connected to another
> terminal?
I don't know about re-attaching, however if all that you want is to run process 
even after closing shell or logout, you may use nohup.
e.g
$ nohup myprog &
In this case myprog will run even if you log out.

Raman.P


  Add more friends to your messenger and enjoy! Go to 
http://messenger.yahoo.com/invite/

___
To unsubscribe, email ilugc-requ...@ae.iitm.ac.in with
"unsubscribe  "
in the subject or body of the message.
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] attach a process to terminal

2009-04-07 Thread Roshan George
On Tue, 2009-04-07 at 15:26 +0530, Ashish Verma wrote:

> But then, the process should have been started in screen. I started it
> directly in a pty and closed that pty.
> 
> Is there no way to restart it without reattaching it. Or opening a new pty
> which is now of the same number as the closed one and doing something to
> attach the process to the new pty.

AFAIK, this is simply not possible.
-- 
Regards,
Roshan George 

___
To unsubscribe, email ilugc-requ...@ae.iitm.ac.in with 
"unsubscribe  "
in the subject or body of the message.  
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] attach a process to terminal

2009-04-07 Thread Kenneth Gonsalves
On Tuesday 07 April 2009 15:30:13 Joe Steeve wrote:
> Kenneth Gonsalves  writes:
> >> from the terminal that started it. I could not locate a way to
> >> attach it to some other terminal and restart it. Is there a way
> >> to do this. I mean can the process be restarted in any way or
> >> connected to another terminal?
> >
> > you could use screen

of course - I dont think one can revive a dead process
-- 
regards
kg
http://lawgon.livejournal.com
___
To unsubscribe, email ilugc-requ...@ae.iitm.ac.in with 
"unsubscribe  "
in the subject or body of the message.  
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] attach a process to terminal

2009-04-07 Thread Sahasranaman MS
On Tue, Apr 7, 2009 at 3:07 PM, Ashish Verma wrote:

> I mean can
> the process be restarted in any way or connected to another terminal?
>


You could kill the process and start it again in daemon mode:

# rsync --daemon
or
# rsync -d


Sahas
___
To unsubscribe, email ilugc-requ...@ae.iitm.ac.in with 
"unsubscribe  "
in the subject or body of the message.  
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] attach a process to terminal

2009-04-07 Thread anantha narasimhan
Hi,

On Tue, Apr 7, 2009 at 9:37 PM, Ashish Verma wrote:

> Hi,
>
> I had started a rsync process in the bg and then happened to close that
> terminal. Now that process shows a S status in ps and is not working.
>
> >From what I found out, this is because the process has been disconnected
> from the terminal that started it. I could not locate a way to attach it to
> some other terminal and restart it. Is there a way to do this. I mean can
> the process be restarted in any way or connected to another terminal?


How about sending SIGHUP to that process ?



-- 
keep klicking
Anantha Narasimhan


The box said.
"Requires Windows XP or better".
So, I installed Linux.
___
To unsubscribe, email ilugc-requ...@ae.iitm.ac.in with 
"unsubscribe  "
in the subject or body of the message.  
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] attach a process to terminal

2009-04-07 Thread Ashok Gautham
I think screen might be an overkill for this

http://dtach.sourceforge.net/

---
Ashok `ScriptDevil` Gautham
___
To unsubscribe, email ilugc-requ...@ae.iitm.ac.in with 
"unsubscribe  "
in the subject or body of the message.  
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc