The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
su (switching to other user) bjagadeesh Shell Programming and Scripting 2 05-21-2008 01:51 AM
su (switching to other user) bjagadeesh Shell Programming and Scripting 1 05-20-2008 07:27 AM
Active / Non Active users ? varungupta UNIX for Advanced & Expert Users 3 05-11-2008 08:00 PM
Switching SAN storage myloginid Filesystems, Disks and Memory 1 04-22-2006 06:03 PM
switching directories in C owijust High Level Programming 1 01-23-2006 08:09 AM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-25-2007
Registered User
 

Join Date: Jun 2007
Posts: 3
Switching the active pts?

My apologies in advance if this question has already been asked or if I use incorrect terminology; I have tried searching for nearly an hour without any luck.

Is there any way to change the active TTY for a session? I was monitoring a long (~5 hour) process through an SSH connection and the network went down. The box is still running the job, but my SSH connection is no longer associated with it.

I tried doing a tail -f on the file descriptor in /dev/pts but get no output. Is there a straightforward way to change my session's pts?

Thanks,
Tres
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 06-25-2007
Registered User
 

Join Date: Jan 2007
Posts: 2,965
If the job is no longer associated with a pseudo-terminal then (as far as I know) it cannot be re-attached from outside the process.

Is the process "1" the ultimate parent of the group of tasks?
Reply With Quote
  #3 (permalink)  
Old 06-25-2007
Registered User
 

Join Date: Jun 2007
Posts: 3
Quote:
If the job is no longer associated with a pseudo-terminal then (as far as I know) it cannot be re-attached from outside the process.

Is the process "1" the ultimate parent of the group of tasks?
No, it is still associated with a pseudo-terminal - I'm just wondering how I can set that pseudo-terminal as the active one for my session. Here is one process that was active when the network went down:

Code:
tspicher 22682 18433  0 15:50:58 pts/5    0:01 lynx
How can I set pts/5 as my active pseudo-terminal?
Reply With Quote
  #4 (permalink)  
Old 06-25-2007
Registered User
 

Join Date: Jan 2007
Posts: 2,965
I must admit I don't know.

Traditionally there are the pairs /dev/ptyXX and /dev/ttyXX where one side was the terminal for the program, the other was for a controlling program.

But the /dev/pts/XX come from being created by opening /dev/ptmx, this will create new pairs as required as the previously mentioned mechanism didn't scale.

I don't see how you could open /dev/ptmx and get a previously created /dev/pts/XX.
Reply With Quote
  #5 (permalink)  
Old 06-25-2007
Registered User
 

Join Date: Jun 2007
Posts: 3
Quote:
Originally Posted by porter View Post
I must admit I don't know.
Thanks for trying! If anyone else has any ideas, I'd love to hear them.
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 05:42 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0