157 char *qhpsiargs[6] = { 0, 0, 0, 0, 0, 0 };
163 unsigned int qhpsiminsize = 0;
164 unsigned int qhpsimaxsize = 0;
169 size = (
unsigned int) st.st_size;
171 x = env_get(
"QHPSIMINSIZE");
172 if (x) { scan_ulong(x,&u); qhpsiminsize = (int) u; }
173 if (qhpsiminsize)
if (
size < qhpsiminsize)
return;
174 x = env_get(
"QHPSIMAXSIZE");
175 if (x) { scan_ulong(x,&u); qhpsimaxsize = (int) u; }
176 if (qhpsimaxsize)
if (
size > qhpsimaxsize)
return;
179 switch (child = fork()) {
185 qhpsiargs[2] = env_get(
"QHPSIARG1");
186 if (!qhpsiargs[2]) qhpsiargs[2] = 0;
187 qhpsiargs[3] = env_get(
"QHPSIARG2");
188 if (!qhpsiargs[3]) qhpsiargs[3] = 0;
189 qhpsiargs[4] = env_get(
"QHPSIARG3");
190 if (!qhpsiargs[4]) qhpsiargs[4] = 0;
191 x = env_get(
"QHPSIRC");
192 if (x) { scan_ulong(x,&u); qhpsirc = (int) u; }
193 execvp(*qhpsiargs,qhpsiargs);
196 if (wait_pid(&wstat,child) == -1)
die_qhpsi();
198 childrc = wait_exitcode(wstat);
199 if (childrc == qhpsirc) {
cleanup();
die(32); }