all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re[2]: get stdout/stderr while running a program
  2002-11-29  9:54 Victor Kirk
@ 2002-11-29 10:08 ` Nagash
  0 siblings, 0 replies; 2+ messages in thread
From: Nagash @ 2002-11-29 10:08 UTC (permalink / raw)
  Cc: help-gnu-emacs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=us-ascii, Size: 1104 bytes --]

Hello Victor,

Friday, November 29, 2002, 10:54:02 AM, you wrote:

>>  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?
yes, but only after exiting the program.

>   What happens if you run
>   it from a shell outside of emacs?
all output is immediately visible.

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

/* ... other lines of nice code */

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


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


thanks for your help!

-- 
Best regards,
 Oliver                            mailto:nagash2270@yahoo.de


__________________________________________________________________

Gesendet von Yahoo! Mail - http://mail.yahoo.de
Möchten Sie mit einem Gruß antworten? http://grusskarten.yahoo.de

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

* 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

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

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.