summaryrefslogtreecommitdiff
path: root/libio/pclose.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/pclose.c')
-rw-r--r--libio/pclose.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/libio/pclose.c b/libio/pclose.c
new file mode 100644
index 0000000000..e5d7c0c9c9
--- /dev/null
+++ b/libio/pclose.c
@@ -0,0 +1,16 @@
+#include "libioP.h"
+#include "stdio.h"
+#include <errno.h>
+
+int
+pclose(fp)
+ FILE *fp;
+{
+#if 0
+ /* Does not actually test that stream was created by popen(). Instead,
+ it depends on the filebuf::sys_close() virtual to Do The Right Thing. */
+ if (fp is not a proc_file)
+ return -1;
+#endif
+ return _IO_fclose(fp);
+}