Santiago Agüero wrote:

> The script's output is being used as a way to check for any syntax error,
> it should print (and it is, in bash):
> 
> /bin/sh errors.sh
> errors.sh: line 5: syntax error near unexpected token `newline'
> errors.sh: line 5: `foo('
> 
> And yes, the job exits quickly, in fact, if you use a short sleep (ie:
> sleep 1m) it works, not all the times, though.
> 
> I've been looking at the ch_logfile messages and got:
> 
> - RubJob # works
> 
> 133.807009 : Starting job: /bin/sh  errors.sh
> 133.807064 on 8: Created channel
> 133.807414 on 7: Freeing job
> 133.807501 : looking for messages on channels
> 133.807506 on 7: Closing channel
> 133.807508 on 7: Clearing channel
> 133.807511 on 7: Freeing channel
> 133.807534 : looking for messages on channels
> 133.808933 RECV on 8: 'errors.sh: line 5: syntax error near unexpected
> token `newline'
> errors.sh: line 5: `foo('
> '
> 133.808941 on 8: Invoking channel callback HandlerCallback
> 133.809058 on 8: Invoking channel callback HandlerCallback
> 133.809108 ERR on 8: channel_select_check(): Cannot read from channel, will
> close it soon
> 133.809112 : looking for messages on channels
> 133.809114 on 8: Closing channel because of previous read error
> 133.809116 on 8: Closing channel
> 133.809122 on 8: Invoking callbacks before closing
> 133.809124 on 8: Invoking close callback HandlerClose
> 134.309137 : looking for messages on channels
> 144.312764 on 8: Job ended
> 
> - RunJob | sleep 50m # doesn't work
> 
> 151.694974 : Starting job: /bin/sh  errors.sh
> 151.695013 on 9: Created channel
> 151.695387 on 8: Freeing job
> 151.745598 ERR on 9: channel_select_check(): Cannot read from channel, will
> close it soon
> 151.745623 : looking for messages on channels
> 151.745628 on 9: Closing channel because of previous read error
> 151.745631 on 9: Closing channel
> 151.745650 on 9: Invoking callbacks before closing
> 151.745655 on 9: Invoking close callback HandlerClose
> 151.745764 on 8: Closing channel
> 151.745767 on 8: Clearing channel
> 151.745771 on 8: Freeing channel
> 151.745792 : looking for messages on channels
> 162.255837 on 9: Job ended

Thanks, this is useful.  Now we need to find out why we see an error or
nothing to read, while reading the pipe/socket should give us the
output.  Adding some ch_logs() calls in channel_wait() could help
pinpoint it.

-- 
MAN:     You don't frighten us, English pig-dog!  Go and boil your bottoms,
         son of a silly person.  I blow my nose on you, so-called Arthur-king,
         you and your silly English K...kaniggets.
   He puts hands to his ears and blows a raspberry.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

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

Raspunde prin e-mail lui