Thread: [Fremantle Maemo5+Harmattan Maemo6] [Announce] gpscon gps position cli shell console
View Single Post
pichlo's Avatar
Posts: 6,445 | Thanked: 20,981 times | Joined on Sep 2012 @ UK
#15
Even better:
Code:
[nemo@Dinghy ~]$ gpscon
Latitude: 51.6126; Longitude: -0.730567; Altitude: nan
Latitude: 51.6844; Longitude: -1.26139; Altitude: nan
Latitude: 51.6844; Longitude: -1.26139; Altitude: nan
Latitude: 51.6844; Longitude: -1.26139; Altitude: nan
^C
[nemo@Dinghy ~]$ gpscon runs=1
Latitude: 51.6126; Longitude: -0.730567; Altitude: nan
[nemo@Dinghy ~]$
WTF???

However,
Code:
[nemo@Dinghy ~]$ gpscon runs=3
Latitude: 51.6126; Longitude: -0.730567; Altitude: nan
Latitude: 51.6844; Longitude: -1.26139; Altitude: nan
Latitude: 51.6844; Longitude: -1.26139; Altitude: nan
[nemo@Dinghy ~]$ gpscon runs=1
Latitude: 51.6844; Longitude: -1.26139; Altitude: nan
[nemo@Dinghy ~]$
So clearly, the last known value gets updated only when
  1. gpscon has completed at least two runs and
  2. gpscon terminated on its own, without ^C

The remaining £100 question is, why does gpscon runs=3 not terminate when run from a script triggered by cron when it quite happily terminates when the same script is run manually from the command line.
__________________
Русский военный корабль, иди нахуй!