Re: Strange pager (less, more) behavior



Kasper Dupont
<47741373198819964262@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> writes:

Another way of interpreting the word reopen in that context
would be to just make stdout again refer to an open file,
which you could write to using the usual stdio functions.

Whether that is possible I cannot tell you. I think freopen
might actually work in some implementations. But I wouldn't
rely on it.

I would. C99 says this:

The primary use of the freopen function is to change the file
associated with a standard text stream (stderr, stdin, or stdout),
as those identifiers need not be modifiable lvalues to which the
value returned by the fopen function may be assigned.

--
Måns Rullgård
mru@xxxxxxxxxxxxx
.



Relevant Pages

  • stdout being redirected to an open file?
    ... Does anyone know why text sent to stdout might intermittently get sent ... the log statements began to ... //Create a unique filename for the order ... handle for the open file is being provided for calls to stdout. ...
    (comp.lang.java.programmer)
  • Re: stdout being redirected to an open file?
    ... >>Does anyone know why text sent to stdout might intermittently get sent ... >>to an open file? ... the log statements began to ... Canadian Mind Products, Roedy Green. ...
    (comp.lang.java.programmer)
  • Re: How should I reopen stdout, so that I can change stream orientation using fwide()
    ... There's freopen function that allows to reopen ... any stream, including stdout. ... On linux one can use fdopen to attach new stream to ... have an appropriate newsgroups line in your header for your mail to be seen, ...
    (comp.lang.c.moderated)
  • Re: stdout being redirected to an open file?
    ... >Does anyone know why text sent to stdout might intermittently get sent ... >to an open file? ... the log statements began to ... http://mindprod.com Again taking new Java programming contracts. ...
    (comp.lang.java.programmer)