LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-10-2009, 04:11 AM   #1
huyangyang
Member
 
Registered: Nov 2009
Posts: 38

Rep: Reputation: 15
File descriptor problem


[root@localhost ~]# !ll
ll /proc/5825/fd
total 0
lrwx------ 1 root root 64 Oct 28 10:46 0 -> /dev/pts/0
lrwx------ 1 root root 64 Oct 28 10:46 1 -> /dev/pts/0
lrwx------ 1 root root 64 Oct 28 10:46 2 -> /dev/pts/0
lrwx------ 1 root root 64 Oct 28 10:46 255 -> /dev/pts/0
[root@localhost ~]# ps
PID TTY TIME CMD
5825 pts/0 00:00:00 bash
6031 pts/0 00:00:00 ps

what is value of 255 for file descriptors?
 
Old 11-10-2009, 10:39 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 19,322

Rep: Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470
Quote:
Originally Posted by huyangyang View Post
[root@localhost ~]# !ll
ll /proc/5825/fd
total 0
lrwx------ 1 root root 64 Oct 28 10:46 0 -> /dev/pts/0
lrwx------ 1 root root 64 Oct 28 10:46 1 -> /dev/pts/0
lrwx------ 1 root root 64 Oct 28 10:46 2 -> /dev/pts/0
lrwx------ 1 root root 64 Oct 28 10:46 255 -> /dev/pts/0
[root@localhost ~]# ps
PID TTY TIME CMD
5825 pts/0 00:00:00 bash
6031 pts/0 00:00:00 ps

what is value of 255 for file descriptors?
Sorry, we've got absolutely no idea what you're talking about, or what you're asking.

Write a clear question, and provide complete information, such as version/distro of Linux, and what you're trying to do/accomplish.
 
Old 11-10-2009, 07:53 PM   #3
huyangyang
Member
 
Registered: Nov 2009
Posts: 38

Original Poster
Rep: Reputation: 15
my system version is RHEL5.2,kernel version is 2.6.18-92.el5. I want to know bash by default for this file descriptor for the meaning of 255
 
Old 11-10-2009, 08:01 PM   #4
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339

Rep: Reputation: 231Reputation: 231Reputation: 231
Usually 255 is a bad or deleted file descriptor, If thats what you are talking about.
 
Old 11-10-2009, 08:10 PM   #5
huyangyang
Member
 
Registered: Nov 2009
Posts: 38

Original Poster
Rep: Reputation: 15
Why bash each terminal are open?
 
Old 11-10-2009, 08:12 PM   #6
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339

Rep: Reputation: 231Reputation: 231Reputation: 231
Quote:
Originally Posted by huyangyang View Post
Why bash each terminal are open?
What?
 
Old 11-10-2009, 08:36 PM   #7
huyangyang
Member
 
Registered: Nov 2009
Posts: 38

Original Poster
Rep: Reputation: 15
if bad or deleted file descriptor,why each terminal are open?
[root@localhost ~]# tty
/dev/pts/1
[root@localhost ~]# ps
PID TTY TIME CMD
6860 pts/1 00:00:00 bash
7200 pts/1 00:00:00 ps
[root@localhost ~]# ll /proc/6860/fd
total 0
lrwx------ 1 root root 64 Oct 28 17:29 0 -> /dev/pts/1
lrwx------ 1 root root 64 Oct 28 17:51 1 -> /dev/pts/1
lrwx------ 1 root root 64 Oct 28 17:50 2 -> /dev/pts/1
lrwx------ 1 root root 64 Oct 28 17:51 255 -> /dev/pts/1
[root@localhost ~]#

[root@localhost ~]# tty
/dev/pts/2
[root@localhost ~]# ps
PID TTY TIME CMD
7171 pts/2 00:00:00 bash
7203 pts/2 00:00:00 ps
[root@localhost ~]# ll /proc/7171/fd
total 0
lrwx------ 1 root root 64 Oct 28 18:19 0 -> /dev/pts/2
lrwx------ 1 root root 64 Oct 28 18:20 1 -> /dev/pts/2
lrwx------ 1 root root 64 Oct 28 18:20 2 -> /dev/pts/2
lrwx------ 1 root root 64 Oct 28 18:20 255 -> /dev/pts/2
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Too many file open - How can we define Max limit of file descriptor janeshb Linux - Server 11 09-29-2009 11:41 AM
open local file error when creating file descriptor hellgirl Linux - Newbie 1 09-14-2009 11:03 PM
DF / DU open file descriptor problem on CFS mounted directory kipkiller Linux - Server 1 06-30-2009 09:11 AM
Deleted log file - how to get back via file descriptor and keep alive? prollocks Linux - General 1 05-29-2009 10:08 AM
apt-file returns nothing; 'bad file descriptor' overbored Debian 3 10-03-2004 10:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration