Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.networking > #2079
| From | Unknown <dog@gmail.com> |
|---|---|
| Newsgroups | comp.os.linux.networking, comp.os.linux.misc |
| Subject | Re: Mental-model of multiprocessing? |
| Date | 2013-04-03 08:02 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <kjgnmm$rin$1@dont-email.me> (permalink) |
| References | <rovg2ax8ap.ln2@news.roaima.co.uk> <kj500f$qll$1@dont-email.me> <kjc9b1$nf5$1@dont-email.me> |
Cross-posted to 2 groups.
On Mon, 01 Apr 2013 15:32:49 +0000, Joe Beanfish wrote: > On Fri, 29 Mar 2013 21:10:40 +0000, Avoid9Pdf wrote: >> In article <rovg2ax8ap.ln2@news.roaima.co.uk>, Chris Davies >> <chris-usenet@roaima.co.uk> wrote: >> But the original code used THIS syntax, and that may be the key to >> understanding the code. So then: >> cat>/tmp/mesgFile >> ( >> read line 0<&3 ; echo "$line">$log case "$line" in 2*) ;; *) echo >> "QUIT" 1>&3 ; exit 0 ;; esac echo "HELO $local_name" 1>&3 >> ) 3<>/dev/tcp/$smtp_server/25 >> >> would mean "stdin [since none is provided]" writeTo /tmp/mesgFile the >> sequential output of the bracketed-statements [which also write to >> there OWN destinations] >> .... ?? > > I think part of your confusion is thinking the cat is somehow related to > the () section. > Yes exactly: with this chaotic/unsequenced syntax, where the redirection can appear anywhere, I assumed that `cat>/tmp/mesgFile` ALSO hangs on the (). > In the above cat will read stdin and write it to mesgFile. The script > will not proceed until that process is finished, ie when cat's stdin > reaches end of file. Then the script will proceed to execute the () > block with file-descriptor 3 directed to /dev/tcp/$smtp_server/25 What *is* EOF for cat's stdIn? <EnterKey> ? In the context of the overall task: a SMTP dialog; what is the use of `cat>/tmp/mesgFile` ? BTW, I've been telling myself and others how good *nix is, because it uses the concatenative paradigm: where you can pipe transformations. And if stage N tests OK, you don't need to worry/remember previous stages. Now I find that, in this example, if the ()-block is 222-lines, you only find at the END what FD3 is. So you've got to carry that info all that way. That's crap !! These FB/twitter kiddies, who've hi-jacked MY thread, need to realise that computing progress is not limited by core-count, but by human cognitive load. It's fundamental that terms/concepts are defined/ introduced before they are used. == Do you see the overall picture of how this code impliments a SMTP-client? And how the: user, script, logFile, remoteServer; all communicate? == TIA.
Back to comp.os.linux.networking | Previous | Next — Previous in thread | Find similar | Unroll thread
Mental-model of multiprocessing? Avoid9Pdf@gmail.com - 2013-03-27 11:13 +0000
Re: Mental-model of multiprocessing? Joe Beanfish <joebeanfish@nospam.duh> - 2013-03-27 14:02 +0000
Re: Mental-model of multiprocessing? Richard Kettlewell <rjk@greenend.org.uk> - 2013-03-27 14:13 +0000
Re: Mental-model of multiprocessing? The Natural Philosopher <tnp@invalid.invalid> - 2013-03-27 14:35 +0000
Re: Mental-model of multiprocessing? Chris Davies <chris-usenet@roaima.co.uk> - 2013-03-27 15:30 +0000
Re: Mental-model of multiprocessing? The Natural Philosopher <tnp@invalid.invalid> - 2013-03-27 18:57 +0000
Re: Mental-model of multiprocessing? Richard Kettlewell <rjk@greenend.org.uk> - 2013-03-27 21:15 +0000
Re: Mental-model of multiprocessing? The Natural Philosopher <tnp@invalid.invalid> - 2013-03-27 21:36 +0000
Re: Mental-model of multiprocessing? Aragorn <stryder@telenet.be.invalid> - 2013-03-28 06:56 +0100
Re: Mental-model of multiprocessing? Jorgen Grahn <grahn+nntp@snipabacken.se> - 2013-03-27 21:47 +0000
Re: Mental-model of multiprocessing? Avoid9Pdf@gmail.com - 2013-03-29 14:28 +0000
Re: Mental-model of multiprocessing? The Natural Philosopher <tnp@invalid.invalid> - 2013-03-29 15:32 +0000
Re: Mental-model of multiprocessing? J G Miller <miller@yoyo.ORG> - 2013-03-29 22:36 +0000
Re: Mental-model of multiprocessing? Chris Davies <chris-usenet@roaima.co.uk> - 2013-03-29 17:31 +0000
Re: Mental-model of multiprocessing? Avoid9Pdf@gmail.com - 2013-03-29 21:10 +0000
Re: Mental-model of multiprocessing? "Chris F.A. Johnson" <cfajohnson@gmail.com> - 2013-03-29 18:55 -0400
Re: Mental-model of multiprocessing? Unknown <dog@gmail.com> - 2013-03-30 06:01 +0000
Re: Mental-model of multiprocessing? Chris Davies <chris-usenet@roaima.co.uk> - 2013-03-30 21:28 +0000
Re: Mental-model of multiprocessing? Joe Beanfish <joebeanfish@nospam.duh> - 2013-04-01 15:32 +0000
Re: Mental-model of multiprocessing? Unknown <dog@gmail.com> - 2013-04-03 08:00 +0000
Re: Mental-model of multiprocessing? Joe Beanfish <joebeanfish@nospam.duh> - 2013-04-08 14:47 +0000
Re: Mental-model of multiprocessing? Unknown <dog@gmail.com> - 2013-04-03 08:02 +0000
csiph-web