Re: popen2 popen call

From: heitkamp
Date: Thu Aug 27 2009 - 14:39:22 EST



-------------- Original message from Andreas Schwab <schwab@xxxxxxxxxx>: --------------


> "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.

Fred

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/