From: kgold@watson.ibm.com (kgold)
Subject: Re: get stdout/stderr while running a program
Date: 2 Dec 2002 14:48:25 GMT [thread overview]
Message-ID: <asfrrp$gfk$1@news.btv.ibm.com> (raw)
In-Reply-To: mailman.1038515961.2212.help-gnu-emacs@gnu.org
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
next prev parent reply other threads:[~2002-12-02 14:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.1038515961.2212.help-gnu-emacs@gnu.org>
2002-11-29 12:28 ` get stdout/stderr while running a program Andrew Markebo
2002-12-02 14:48 ` kgold [this message]
2002-11-29 9:54 Victor Kirk
-- strict thread matches above, loose matches on Subject: below --
2002-11-28 20:38 Nagash
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='asfrrp$gfk$1@news.btv.ibm.com' \
--to=kgold@watson.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).