[lkml]   [2001]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectHow do I make a circular pipe?
How do I do the following:

# --> pppd notty | pppoe -I eth1 | --

I.E. connect the stdout of a process (or chain
thereof) to its own stdin?

So I wrote a program to do it, along the lines of:

sixty-nine /bin/sh -c "pppd notty | pppoe -I eth1"

With an executable approximately along the lines of
(warning, pseudo-code, the other machine isn't hooked
up to the internet at the moment for obvious reasons):

int main(int argc, char *argv[], char *envp[])
int fd[2];

And it didn't work. I made a little test program that
writes to stdout and reads from stdin and reports to
stderr, and it gets nothing. Apparently, the pipe
fd's evaporate when the process does an execve.

What do I do? (If anybody else knows an easier way to
get pppoe working, that would be helpful too.


(P.S. WHY does pppd want to talk to a tty by default
instead of stdin and stdout? Were the people who
wrote it at all familiar with the unix philosophy?
Just curious...)

Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:25    [W:0.085 / U:9.876 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site