Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #11468
| From | Ángel González <angel@16bits.net> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: Why does a Bash shell script write prompts followed by reads and do it right? |
| Date | 2015-09-02 20:27 +0200 |
| Message-ID | <mailman.415.1441218434.19560.bug-bash@gnu.org> (permalink) |
| References | <CAAykW6m4H2sSshWNfv3mQr9q6ScKzLebqMBgEo96vRUSBY6SAQ@mail.gmail.com> |
Robert Parker wrote:
> Yet when I attempt the same in a C program, the system always writes
> 2 prompts, then waits for a read.
> Does not matter if I write(1, "..."); read(0, number, buffer); or use
> fputs("...", stdout); fgets(.....
> The result is the same.
> And I have tried using readline without any better result.
I completely agree with Bob. It looks like your C program were doing a
loop (which your shell script doesn't!) and there's a wrong condition
somewhere.
But you need to show the code that is failing (provide a minimal
program that exhibits the failure).
Back to gnu.bash.bug | Previous | Next | Find similar
Re: Why does a Bash shell script write prompts followed by reads and do it right? Ángel González <angel@16bits.net> - 2015-09-02 20:27 +0200
csiph-web