Menu

#48 [PATCH] markdown plugin freezes

open
nobody
None
5
2008-09-16
2008-09-16
No

Hi. In 3.4-RC2 you have tried to get rid of the hard coded paths in the markdown.sh plugins. Trying this release candidate nanoblogger freezes everytime this plugin is called (I have verified this using bash -x). I guess the problem is that you don't feed any input into markdown and so it blocks for input on stdin. I'm pretty sure this isn't a FreeBSD specific issue this time ;)

Regards Tobias

This simple patch fixes this issue for me:

--- markdown.sh.orig 2008-09-16 10:59:06.000000000 +0200
+++ markdown.sh 2008-09-16 10:59:06.000000000 +0200
@@ -5,7 +5,7 @@
${MARKDOWN_CMD:=markdown}
${MARKDOWN_OPTS:= }

-eval $MARKDOWN_CMD > "$SCRATCH_FILE".plugin_devnull 2>&1 &&
+eval $MARKDOWN_CMD <<< "test" > "$SCRATCH_FILE".plugin_devnull 2>&1 &&
MARKDOWN_INPATH=true

if [ "$MARKDOWN_INPATH" = "true" ]; then

Discussion

  • Kevin Wood

    Kevin Wood - 2008-09-16

    Thanks for the heads up. Unfortunately, the triple set of redirects screws with my editor's syntax colors, so I opted to send the fake data through a pipe instead:

    echo test |eval $MARKDOWN_CMD > "$SCRATCH_FILE".plugin_devnull 2>&1 && MARKDOWN_INPATH=true

    Let me know if this doesn't work.

     
  • Anonymous

    Anonymous - 2008-09-17

    I will test this ASAP. Thinking about it (without having tested it) I guess something like

    eval $MARKDOWN_CMD -v > "$SCRATCH_FILE".plugin_devnull 2>&1 &&
    MARKDOWN_INPATH=true

    looks much more robust. But as I've said: I'll test it. But don't expect any results before the weekend ;)

    Regards Tobias

     
  • Anonymous

    Anonymous - 2008-09-17

    Ok. It's not yet weekend, but I tested it anyway. All three solutions you find in this issue fix the problem. So it's your choice. Regards Tobias

     

Log in to post a comment.

MongoDB Logo MongoDB