Unified · Split
| @@ -5087,6 +5087,7 @@ let () = · 5086 unmodified lines | |||
| 5087 | then String.sub css 0 (l-2) | 5087 | then String.sub css 0 (l-2) |
| 5088 | else (if css.[l-1] = '\n' then String.sub css 0 (l-1) else css) | 5088 | else (if css.[l-1] = '\n' then String.sub css 0 (l-1) else css) |
| 5089 | end; | 5089 | end; |
| 5090 | let efd = try Unix.dup Unix.stderr with _ -> Unix.stdout in | ||
| 5090 | state.stderr <- | 5091 | state.stderr <- |
| 5091 | Ffi.init cs ( | 5092 | Ffi.init cs ( |
| 5092 | conf.angle, conf.fitmodel, (conf.trimmargins, conf.trimfuzz), | 5093 | conf.angle, conf.fitmodel, (conf.trimmargins, conf.trimfuzz), |
| @@ -5236,6 +5237,12 @@ let () = · 143 unmodified lines | |||
| 5236 | in | 5237 | in |
| 5237 | match loop infinity with | 5238 | match loop infinity with |
| 5238 | | exception Quit -> | 5239 | | exception Quit -> |
| 5240 | (try | ||
| 5241 | let s = Buffer.contents state.errmsgs in | ||
| 5242 | match String.length s with | ||
| 5243 | | 0 -> () | ||
| 5244 | | n -> ignore @@ Unix.write efd (Bytes.of_string s) 0 n | ||
| 5245 | with _ -> ()); | ||
| 5239 | Config.save leavebirdseye; | 5246 | Config.save leavebirdseye; |
| 5240 | if Ffi.hasunsavedchanges () | 5247 | if Ffi.hasunsavedchanges () |
| 5241 | then save () | 5248 | then save () |
| @@ -35,9 +35,10 @@ · 34 unmodified lines | |||
| 35 | a) die doesn't really | 35 | a) die doesn't really |
| 36 | b) especially in bocaml where subshell was used ("(" instead of "{") | 36 | b) especially in bocaml where subshell was used ("(" instead of "{") |
| 37 | why? i don't remember :( | 37 | why? i don't remember :( |
| 38 | * DONE stderr | 38 | * DONE ? stderr |
| 39 | CLOSED: [2020-10-25 Sun 05:41] | 39 | CLOSED: [2020-10-25 Sun 10:48] |
| 40 | cf. 89c908a345f2b6a0f0e15ba2009c87c880b95cb8 | 40 | cf. 89c908a345f2b6a0f0e15ba2009c87c880b95cb8 |
| 41 | ml_spawn uses posix_spawn (/bin/sh -c ...) | 41 | ml_spawn uses posix_spawn (/bin/sh -c ...) |
| 42 | /bin/sh reparts errors via stderr, thus making them | 42 | /bin/sh reparts errors via stderr, thus making them |
| 43 | completely hidden from the UI | 43 | completely hidden from the UI |
| 44 | maybe it makes sense to pipe leftover errmsgs to some congiurable sink | ||