9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Different results for the same rc script when using listen1
@ 2011-04-24  5:09 Maurício CA
  2011-04-24  5:22 ` andrey mirtchovski
  2011-04-24 14:20 ` smiley
  0 siblings, 2 replies; 32+ messages in thread
From: Maurício CA @ 2011-04-24  5:09 UTC (permalink / raw)
  To: 9fans

Hi, all,

This seems like black magic to me.  I've wrote this small example to
try to understand a problem with a bigger script.

    #!/usr/bin/env rc
    if (test 1 -ne 1) {
        echo I am insane.
    }
    if not {
        echo I am not insane.
    }

Obviously, when I run it, I get:

    I am not insane.

However, using (where 'listen_test.rc' is the name I gave this
script):

    listen1 'tcp!localhost!8080' ./listen_test.rc

and

    echo Hi | dial -e 'tcp!localhost!8080'

what I get is:

    I am insane.

How can running a script throw 'listen1' can get 'rc' to fail an 'if'
test?!?!

Thanks for your help,

Maurício





^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2011-04-27 21:57 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-24  5:09 [9fans] Different results for the same rc script when using listen1 Maurício CA
2011-04-24  5:22 ` andrey mirtchovski
2011-04-24  7:30   ` Maurício CA
2011-04-24 14:20 ` smiley
2011-04-24 17:05   ` Maurício CA
2011-04-24 17:17     ` Bakul Shah
2011-04-25  0:16       ` Maurício CA
2011-04-25  2:00         ` Anthony Martin
2011-04-25  3:14           ` Maurício CA
2011-04-25  3:17           ` erik quanstrom
2011-04-25  3:36             ` erik quanstrom
2011-04-25  3:58               ` Bakul Shah
2011-04-25  4:39                 ` erik quanstrom
2011-04-25  5:27                   ` Lyndon Nerenberg
2011-04-25  5:53                   ` Bakul Shah
2011-04-25  6:59                     ` Robert Ransom
2011-04-25 14:56                       ` Bakul Shah
2011-04-25 15:00                         ` erik quanstrom
2011-04-25 16:17                         ` Skip Tavakkolian
2011-04-25 16:27                           ` Joseph Stewart
2011-04-25 20:13                           ` smiley
2011-04-25 20:16                             ` Lyndon Nerenberg
2011-04-25 20:18                             ` erik quanstrom
2011-04-25 14:44                     ` erik quanstrom
2011-04-25 13:53               ` Maurício CA
2011-04-25 14:42                 ` erik quanstrom
2011-04-27 21:57                   ` Maurício CA
2011-04-26  9:02               ` dexen deVries
2011-04-26 12:57                 ` erik quanstrom
2011-04-25  2:03         ` andrey mirtchovski
2011-04-25  2:14           ` Iruatã Souza
2011-04-25  2:20             ` andrey mirtchovski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).