#20884: line buffering in sage-logger causes "hang" due to invisible prompt when
installing experimental packages
-------------------------------------+-------------------------------------
Reporter: mkoeppe | Owner:
Type: defect | Status: needs_work
Priority: critical | Milestone: sage-7.3
Component: build | Resolution:
Keywords: | Merged in:
Authors: Erik Bray | Reviewers: Dima Pasechnik,
| Matthias Koeppe
Report Upstream: N/A | Work issues:
Branch: u/embray/disable- | Commit:
exp-pkg-prompt | 4f7b63f16b156891638b546427f4d9c7e66c7137
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by embray):
And here I thought by relying entirely on bash features this would be
portable. Leave it to OSX to "think different"!
Mysteriously, on my bash `-n` is not quite the same as `-N` even with
`IFS` unset. I think the key is that for `-N` it reads "Delimiter
characters encountered in the input are not treated specially and do
not cause `read` to return until `nchars` are read". So in other words,
hitting "Enter" with `-N 1` will cause read to return a newline literal.
Whereas for `-n` the delimiter is still treated specially and is *not*
returned. Hitting Enter causes `read` to return with no characters read.
It should be made clear that here "delimiter" is referring to the
delimiter that `read` should read up to, not the delimiter(s) used to
split a line, which is what `IFS` is.
The solution is to use `-n`, but treat an empty string has having received
a newline.
--
Ticket URL: <https://trac.sagemath.org/ticket/20884#comment:24>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" 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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.