[mercury-users] waiting for an enter

Tom Wouters tom.wouters1 at student.kuleuven.ac.be
Wed May 28 18:11:39 AEST 2003

Fergus Henderson wrote:
> On 27-May-2003, Tom Wouters <tom.wouters1 at student.kuleuven.ac.be> wrote:
>>i was trying to write an interactive application which requires the 
>>mercury program to wait for an enter on stdin a few times.
>>i tried
> That should work fine.
> It certainly works fine for me (I just tested it).
> What OS are you using?

debian/linux, but i think i know what causes the problem,
part of the program uses a c-library which uses the sig_io to signal 
when a new message has arrived. I guess this is causing the read to 
continue when a message is being received instead of when enter was hit.

when writing the same program in C it exibits the same problems, so 
probably there isn't much to do about it, except checking that the input 
is more dan 0 bytes of length and waiting again in a recursion-loop

< tom.wouters1 at student.kuleuven.ac.be >
< aqua at ulyssis.org                    >
< pgp-key id: 0xA9A4985D              >

mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe

More information about the users mailing list