[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: passing a terminal's fd



> The problem is that once you've passed the descriptor, if the 
> session owner exits, the tty will revoke() the descriptor.
   Ahh. I wasn't thinking about session management, figuring "as long as
  there is one process using it, it won't close it or anything". Heh.

> The only way to get around this is to arrange that the original owner 
> hangs around 'till the new owner is finished with the descriptor.  
> There's no facility for passing session ownership to an arbitrary 
> process.
>
> ppp(8) (in MP mode) handles this by fork()ing itself after passing 
> the ctty descriptor to another process, pause()ing the parent and 
> getting rid of the session in the child (with a setsid() and another 
> fork()).

 Thanks alot, you saved me alot of time.

          Vincent Labrecque                          ASCII Ribbon  /~\
        limitln@cooptel.qc.ca                    Campaign Against  \ /
    http://www.cooptel.qc.ca/~limitln                 HTML Email!   X
                                                                   / \