Date: Sat, 05 Apr 2003 14:12:43 +0100 From: "Richard Dawe" Sender: rich AT phekda DOT freeserve DOT co DOT uk To: djgpp-workers AT delorie DOT com X-Mailer: Emacs 21.3.50 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6 Subject: Clarification for popen docs [PATCH] Message-Id: Reply-To: djgpp-workers AT delorie DOT com Hello. The popen docs aren't very clear about whether you can run a program with or without arguments. You can run a program with arguments. Below is a patch to make it clear. OK to commit? Thanks, bye, Rich =] Index: src/libc/posix/stdio/popen.txh =================================================================== RCS file: /cvs/djgpp/djgpp/src/libc/posix/stdio/popen.txh,v retrieving revision 1.4 diff -p -c -3 -r1.4 popen.txh *** src/libc/posix/stdio/popen.txh 29 Jan 2003 12:51:41 -0000 1.4 --- src/libc/posix/stdio/popen.txh 5 Apr 2003 13:07:43 -0000 *************** *** 5,22 **** @example #include ! FILE *popen(const char *program, const char *mode); @end example @subheading Description ! This function executes the named @code{program} and attaches either its ! input stream or its output stream to the returned file. While the file ! is open, the calling program can write to the program (if the program ! was open for writing) or read the program's output (if the program was ! opened for reading). When the program is done, or if you have no more ! input for it, pass the file pointer to @code{pclose} (@pxref{pclose}), ! which terminates the program. Since MS-DOS does not support multitasking, this function actually runs the entire program when the program is opened for reading, and stores --- 5,23 ---- @example #include ! FILE *popen(const char *cmd, const char *mode); @end example @subheading Description ! This function executes the command or program specified by @code{cmd} ! and attaches either its input stream or its output stream ! to the returned file. While the file is open, the calling program ! can write to the program (if the program was open for writing) ! or read the program's output (if the program was opened for reading). ! When the program is done, or if you have no more input for it, pass ! the file pointer to @code{pclose} (@pxref{pclose}), which terminates ! the program. Since MS-DOS does not support multitasking, this function actually runs the entire program when the program is opened for reading, and stores