Re: pfiles handle 255



Rodrick R. Brown wrote:
Anyone know off hand why the following handle is usually opened by most proccesses and usually given the highest allowed number in the open file process table?

255: S_IFCHR mode:0620 dev:274,0 ino:12582918 uid:100 gid:7 rdev:24,1
O_RDWR|O_NOCTTY|O_LARGEFILE FD_CLOEXEC
/devices/pseudo/pts@0:1


That's a bash feature:

http://cvs.opensolaris.org/source/xref/sfw/usr/src/cmd/bash/bash-3.0/general.c#413

Used that way:

/* Open the script. But try to move the file descriptor to a randomly
large one, in the hopes that any descriptors used by the script will
not match with ours. */
.



Relevant Pages

  • Re: [opensuse] saving boot-time console output
    ... # Set I/O of this script and its childs to console ... not specify a file descriptor open for input, ... a redirection error occurs. ... standard output is used. ...
    (SuSE)
  • Re: Solaris 10 - catman weird error
    ... DTrace can absolutely help in this situation. ... returns EIO or EBADF: ... probably want to know _how_ exactly the file descriptor was closed. ... that you know the process ID of the problematic process, here is a D script ...
    (comp.unix.solaris)
  • Re: Encrypted passwords
    ... tive scripts can set an account password using pw. ... a file descriptor (usually a pipe between an interactive ... script and the program). ... > chpass: updating the database... ...
    (FreeBSD-Security)
  • handle, descriptor, fork... how to start?
    ... I'm trying to create one script for vgetty. ... my tcl script. ... And send one file descriptor to my script. ...
    (comp.lang.tcl)
  • Re: Is it possible?: cat text.txt | python_script_which_also_gets_user_input.py
    ... |> I run in a problem with a script, that shall work similar like the c-program ... |> is interactive by the user via the curses module. ... File redirection that's effective ... 1 and 2 are all just dups of the same read/write file descriptor ...
    (comp.lang.python)