[lkml]   [2009]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: popen2 popen call

    -------------- Original message from Andreas Schwab <>: --------------

    > "F. Heitkamp" writes:
    > > When the popen call is made in sshd/session.c I get a error from
    > > strerror of "Function not Implemented".
    > Which function exactly returns this error?

    In the openssh source distribution there is a file, session.c that uses popen, with the
    ultimate purpose of fixing the .Xauthority file for X11 forwarding. It uses popen to set the DISPLAY, MIT-MAGIC-COOKIE etc. via the shell I think, executing xauth. In session.c popen is used three times under different conditions. I put strerror calls where the popen call returns a NULL pointer to try to find out why the popen call fails. I could post the section of code if you want to see. I am not a professional programmer.

    The gist of it is:

    fp = popen( cmdstr, "w" );
    if ( !fp )
    /* call strerror, errno */
    > There is no such thing as a popen2 syscall.

    OK. I read in one of the messages, that glibc, passes the popen call to a ABI in the kernel. I have not looked at the code in glibc yet.


     \ /
      Last update: 2009-08-27 20:41    [from the cache]
    ©2003-2014 Jasper Spaans. hosted at Digital Ocean