On Sunday, December 29, 2013 11:08:53 AM UTC-8, Nils Bruin wrote:
>
>  I don't see why 31307 and 31305 decide to do different things.
>
In fact, it may be the following: Singular at some point does this write:

read(0, "print(sage698);\n", 1024)      = 16
write(1, "x2^2-x0^2", 9)                = 9
write(1, "\n", 1)                       = 1
write(1, "> ", 2)                       = 2

The corresponding reads are:

log.31305:read(26, "print(sage698);\r\nx2^2-x0^2\r\n> ", 1000) = 30
log.31307:read(26, "print(sage698);x2^2-x0^2\r\n> \r\n", 1000) = 30

As you can see, a new line ends up misplaced when 31307 is reading this. It 
looks like the tty echo doesn't finish before singular manages to write its 
output. I think you found a problem like this before. It would be nice if 
we could get a more systematic solution to this problem, e.g.:
 1) turn off echoing altogether
 2) get the tty to complete its echo before returning the line to the 
process to which the tty is stdin
 3) include a newline with the string we feed to singular (and other 
interfaces): hopefully the line itself gets echoed in one write, so if we 
delimit it by a newline ourselves perhaps we can more easily 
recognize/separate the echo from actual return output.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to