lua-users home
lua-l archive

Re: [PATCH] luaconf.h: call fflush(NULL) before popen()

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> popen(3) manual page says:
> 
> 	Since the standard input of a command opened for reading shares
> 	its seek offset with the process that called popen(), if the
> 	original process has done a buffered read, the command's input
> 	position may not be as expected. Similarly, the output from a
> 	command opened for writing may become intermingled with that of
> 	the original process. The latter can be avoided by calling
> 	fflush(3) before popen().
> 
> And at least some scripting languages call something like "fflush(NULL)"
> before spawning (see e.g. "perldoc -f system").
May this have any relationship with that bug reported from the Monotone
project?
 http://lua-users.org/lists/lua-l/2007-08/msg00590.html
-- Roberto

AltStyle によって変換されたページ (->オリジナル) /