2 do_close(stab,explicit)
17 if (!stio) { /* never opened */
18 if (dowarn && explicit)
19 warn("Close on unopened file <%s>",stab_ename(stab));
23 if (stio->type == '|') {
24 status = mypclose(stio->ifp);
25 retval = (status == 0);
26 statusvalue = (unsigned short)status & 0xffff;
28 else if (stio->type == '-')
31 if (stio->ofp && stio->ofp != stio->ifp) { /* a socket */
32 retval = (fclose(stio->ofp) != EOF);
33 fclose(stio->ifp); /* clear stdio, fd already closed */
36 retval = (fclose(stio->ifp) != EOF);
38 stio->ofp = stio->ifp = Nullfp;