Re: reciproc pipe()

2005-09-04 Thread William Park
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) > { > c

reciproc pipe()

2005-09-02 Thread Robert Millan
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);