Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > microsoft.public.scripting.vbscript > #12290
| From | "R.Wieser" <address@not.available> |
|---|---|
| Newsgroups | microsoft.public.scripting.vbscript |
| Subject | Re: using wshell.exec causes lockup while reading the output - what to do ? |
| Date | 2020-06-20 18:56 +0200 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <rclf40$1rbo$1@gioia.aioe.org> (permalink) |
| References | (3 earlier) <e9938l04vk2i.1v164vs1agbr2.dlg@40tude.net> <rcg13u$12di$1@gioia.aioe.org> <mtx3zo0ajtni.qoe9zkgo6j19$.dlg@40tude.net> <rcirf6$13nm$1@gioia.aioe.org> <1vf0vvxzvl94a$.dnimmt0ejgd7.dlg@40tude.net> |
JJ, > That's the main problem I've been trying to tell you. TextStream > simply isn't capable enough when the stream is a standard handle > which is a character device So, I /can't/ check if its empty, I /can't/ ask how full it is, and its "read data" methods are all blocking ones. The only way "exec" with output capturing can work is either with having just a single stream (on which the "readall" method would probably work), or when having two streams that /both/ emit lines of data (so that the "readline" method can be used), with both lines being shorter than a buffers worth. That strongly limits the "exec" methods use cases. Wait ... Nope, having both emit lines will still cause deadlocks. Just imagine one stream getting shorter lines than the other. As you can't empty a stream (trying to do so will cause a blocking situation) and you can't skip reading a stream when it doesn't have any data (checking for that also blocks), the buffer getting the longer lines will eventually fill up and block. I really start to hate MS. :-( > I'm guessing that you also need to inspect the outputted data > right away, instead of waiting until the program has terminated? The stderr emits a progress counter for the screen (output count and a CR, the new value overwriting the last), stdout is supposed to be written to a file. > There's that limit, yes. But it's not what causing TextStream to > get stuck. I think I understood the bit about blocking reads. The buffersize problem goes, when using the "readline" method, ontop of that. Or did I mis something ? Regards, Rudy Wieser
Back to microsoft.public.scripting.vbscript | Previous | Next — Previous in thread | Next in thread | Find similar
using wshell.exec causes lockup while reading the output - what to do ? "R.Wieser" <address@not.available> - 2020-06-17 14:32 +0200
Re: using wshell.exec causes lockup while reading the output - what to do ? "Mayayana" <mayayana@invalid.nospam> - 2020-06-17 08:48 -0400
Re: using wshell.exec causes lockup while reading the output - what to do ? JJ <jj4public@vfemail.net> - 2020-06-17 22:12 +0700
Re: using wshell.exec causes lockup while reading the output - what to do ? "R.Wieser" <address@not.available> - 2020-06-17 18:51 +0200
Re: using wshell.exec causes lockup while reading the output - what to do ? JJ <jj4public@vfemail.net> - 2020-06-18 19:42 +0700
Re: using wshell.exec causes lockup while reading the output - what to do ? "R.Wieser" <address@not.available> - 2020-06-18 17:26 +0200
Re: using wshell.exec causes lockup while reading the output - what to do ? JJ <jj4public@vfemail.net> - 2020-06-19 21:16 +0700
Re: using wshell.exec causes lockup while reading the output - what to do ? "R.Wieser" <address@not.available> - 2020-06-19 19:08 +0200
Re: using wshell.exec causes lockup while reading the output - what to do ? JJ <jj4public@vfemail.net> - 2020-06-20 22:40 +0700
Re: using wshell.exec causes lockup while reading the output - what to do ? "R.Wieser" <address@not.available> - 2020-06-20 18:56 +0200
Re: using wshell.exec causes lockup while reading the output - what to do ? JJ <jj4public@vfemail.net> - 2020-06-21 12:33 +0700
Re: using wshell.exec causes lockup while reading the output - what to do ? "R.Wieser" <address@not.available> - 2020-06-21 08:53 +0200
Re: using wshell.exec causes lockup while reading the output - what to do ? JJ <jj4public@vfemail.net> - 2020-06-21 20:58 +0700
Re: using wshell.exec causes lockup while reading the output - what to do ? "R.Wieser" <address@not.available> - 2020-06-21 17:46 +0200
csiph-web