[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gforth] 'ping' on Android Gforth ( Joel Rees ) 2

From: James Gere
Subject: Re: [gforth] 'ping' on Android Gforth ( Joel Rees ) 2
Date: Fri, 16 Jun 2017 11:13:42 -0400

     Hi, again, Joel,
                                I think your problem lies in how Gforth
uses the shell in Android.  'Ping' without options runs 
interactively, but Gforth waits for the command to
terminate, before unloading the piped output to the terminal.
   To get by this you can specify a packet count ( -c# ) and/or a 
deadline ( -w#) ( in seconds ), ensuring that 'ping' terminates.
   You might try defining 'ping' in Gforth to fix (for example) 
a 5 second  deadline, as in,
          variable line-args
          : ping ( "command-line-arguments" ) 
              s" ping -w5 " line-args $! 
              '#' parse  line-args $+! 
              line-args $@ cr system ; 
     I'm not sure how this works out if you give a 
second -w option, and I'll leave it to those more 
knowledgable of Android to tell you how to get the shell
to interact on a line-by-line basis with Gforth, or if that's 
     Hope this helps.
                       James Gere

reply via email to

[Prev in Thread] Current Thread [Next in Thread]