Robert Millan <[EMAIL PROTECTED]> wrote: > > Hi! > > Is there any way to tell bash to do something like this? If there isn't, I > think it would be nice to have it (maybe through a builtin or something). > > int p1[2]; > int p2[2]; > > pipe(p1); > pipe(p2); > > if (fork () == 0) > { > close (0); dup (p1[0]); > close (1); dup (p2[1]); > exec(whatever); > } > > if (fork () == 0) > { > close (0); dup (p2[0]); > close (1); dup (p1[1]); > exec(whatever); > } > > I.e, each process communicates with the other via stdin/stdout, and we get the > actual results via stderr.
Where would you use it? -- William Park <[EMAIL PROTECTED]>, Toronto, Canada ThinFlash: Linux thin-client on USB key (flash) drive http://home.eol.ca/~parkw/thinflash.html BashDiff: Super Bash shell http://freshmeat.net/projects/bashdiff/ . _______________________________________________ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash