#include "CExc.h"
#include "nsSysteme.h"
int ppal (int argc, char * argv []) throw (CExc)
{
if (1 != argc) throw CExc (string ("Usage
: ") + argv [0]);
int pfd [2];
nsSysteme::pipe (pfd);
if (nsSysteme::fork ())
{
nsSysteme::close (pfd
[0]);
nsSysteme::dup2
(pfd [1], 1);
nsSysteme::close (pfd
[1]);
::execlp ("exo_05a",
"exo_05a", 0);
throw CExcFctSyst ("execlp
()");
}
if (nsSysteme::fork ())
{
nsSysteme::dup2
(pfd [1], 1);
nsSysteme::close
(pfd [1]);
nsSysteme::dup2
(pfd [0], 0);
nsSysteme::close
(pfd [0]);
::execlp ("exo_05c",
"exo_05c", 0);
throw CExcFctSyst
("execlp ()");
}
nsSysteme::close (pfd [1]);
nsSysteme::dup2 (pfd [0], 0);
nsSysteme::close (pfd [0]);
::execlp ("exo_05b", "exo_05b", 0);
throw CExcFctSyst ("execlp ()");
return 0;
} // ppal()