all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* get stdout/stderr while running a program
@ 2002-11-28 20:38 Nagash
  0 siblings, 0 replies; 4+ messages in thread
From: Nagash @ 2002-11-28 20:38 UTC (permalink / raw)


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

Hello ,

  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...

  thanks for your help!

-- 
Best regards,
 Oliver


__________________________________________________________________

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

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

* RE: get stdout/stderr while running a program
@ 2002-11-29  9:54 Victor Kirk
  0 siblings, 0 replies; 4+ 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] 4+ messages in thread

* Re: get stdout/stderr while running a program
       [not found] <mailman.1038515961.2212.help-gnu-emacs@gnu.org>
@ 2002-11-29 12:28 ` Andrew Markebo
  2002-12-02 14:48 ` kgold
  1 sibling, 0 replies; 4+ messages in thread
From: Andrew Markebo @ 2002-11-29 12:28 UTC (permalink / raw)


Hello!

Which platforms, compilers and distribution of emacs are you running
on?

        /Andy

|   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...

-- 
 The eye of the beholder rests on the beauty!

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

* Re: get stdout/stderr while running a program
       [not found] <mailman.1038515961.2212.help-gnu-emacs@gnu.org>
  2002-11-29 12:28 ` Andrew Markebo
@ 2002-12-02 14:48 ` kgold
  1 sibling, 0 replies; 4+ messages in thread
From: kgold @ 2002-12-02 14:48 UTC (permalink / raw)



emacs uses a pipe to route stdout to the buffer.  The C default for
pipes is fully buffered.  So you don't see the output until exit or
the buffer is full.

Put this into your C program main():

    setvbuf(stdout,0,_IONBF,0);

I'm not sure about stderr, since I thought it was unbuffered by
default..

Nagash <nagash2270@yahoo.de> writes:
> 
>   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...

-- 
Ken Goldman   kgold@watson.ibm.com   914-784-7646

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

end of thread, other threads:[~2002-12-02 14:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-28 20:38 get stdout/stderr while running a program Nagash
  -- strict thread matches above, loose matches on Subject: below --
2002-11-29  9:54 Victor Kirk
     [not found] <mailman.1038515961.2212.help-gnu-emacs@gnu.org>
2002-11-29 12:28 ` Andrew Markebo
2002-12-02 14:48 ` kgold

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.