unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* RE: Re[2]: get stdout/stderr while running a program
@ 2002-11-29 10:34 Victor Kirk
  0 siblings, 0 replies; 2+ messages in thread
From: Victor Kirk @ 2002-11-29 10:34 UTC (permalink / raw)
  Cc: help-gnu-emacs

Assuming there is not a probelm with emacs.  presumably 
other programs work fine under the shell.

> a little example:
> /* c-code */
> printf("my output");
> /* "my output" now visible in the shell */

stdout is buffered, so this is only output when the buffer
is full.  What happens if you explicity flush the output by

printf("my output");
fflush(stdout);

> exit(0);
> /* "my output" now visible in my emacs buffer */

This would cause the file buffer to be flushed to the output.


> its a little bit exhausting to switch always between a shell
> and emacs. it interrupts my working flow.

Quite right. One of the most useful things about running a
shell under emacs is you can search through the program's
output
This message, including attachments, is intended only for the use by the
person(s) to whom it is addressed. It may contain information which is
privileged and confidential. Copying or use by anybody else is not
authorised. If you are not the intended recipient, please contact the sender
as soon as possible. The views expressed in this communication may not
necessarily be the views held by Serco Integrated Transport.

^ permalink raw reply	[flat|nested] 2+ messages in thread
* RE: get stdout/stderr while running a program
@ 2002-11-29  9:54 Victor Kirk
  2002-11-29 10:08 ` Re[2]: " Nagash
  0 siblings, 1 reply; 2+ messages in thread
From: Victor Kirk @ 2002-11-29  9:54 UTC (permalink / raw)


>  i've got a small problem with c-programs writing on
>  stdout/stderr. i cannot see the output while running the
>  program over the emacs shell access.
>  after exiting the program the buffer gets filled.
>  a simultaneous output mode would be nice for debug...

Does your program flush the output?  What happens if you run
it from a shell outside of emacs?

Vic
--
This message, including attachments, is intended only for the use by the
person(s) to whom it is addressed. It may contain information which is
privileged and confidential. Copying or use by anybody else is not
authorised. If you are not the intended recipient, please contact the sender
as soon as possible. The views expressed in this communication may not
necessarily be the views held by Serco Integrated Transport.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-11-29 10:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-29 10:34 Re[2]: get stdout/stderr while running a program Victor Kirk
  -- strict thread matches above, loose matches on Subject: below --
2002-11-29  9:54 Victor Kirk
2002-11-29 10:08 ` Re[2]: " Nagash

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).