Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 30th May 2008, 04:06 PM
PhillyFloyd's Avatar
PhillyFloyd Offline
Registered User
 
Join Date: Jun 2007
Location: Washington DC
Posts: 338
Close a file descriptor for a single child process

Greetings

I need to close stdin,stdout,stderr for a child process of sshd (fairly well known issue, but never seem to find a solution)

What happens is a script ssh's to another server and runs a start script for various in-hosue software. The ssh session hangs because it never receives back the close for the file descriptor since the child proc inherits the shell's.

I can narrow down the PID of the parent sshd and see the open fd0,1,2:

lsof -a -p `ps -ef|grep "\[priv\]" | grep -v grep | awk '{print $2}'` -d0,1,2

But I am unsure as to how to close the fd's for this single process ... I am not sure if I can just pipe or echo the pid to <>&- and 0>&- or if I need to reassing the fd's inside the script, then close them inside the script at the end, etc ...

Any ideas is greatly appreciated.
__________________
"You're as useless as a jiffy in a tickless kernel."
Reply With Quote
Reply

Tags
child, close, descriptor, file, process, single

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
There was an error creating the child process for this terminal Vector Using Fedora 6 15th December 2008 07:41 AM
Child Process error - Terminal Window Sam17 Installation and Live Media 0 13th October 2006 02:16 PM
spatial nautilus: close child & open parent with mouse vxneko Using Fedora 0 16th July 2004 06:21 AM


Current GMT-time: 13:49 (Saturday, 25-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat