Re: [ast-users] timers in shell?
Roland once wrote a "timer" builtin which has sub commands "create", "delete", "gettime", "settime" and "getoverrun", and has access to all times the POSIX timer api provides. It either sends SIGALRM or (preferred) SIGRT signals to the consumers. If Glenn and David approve the idea, I'd make him to polish the builtin, for usage in ksh93v-. Olga On Tue, Aug 13, 2013 at 8:38 AM, Cedric Blancher wrote: > Does ksh have a plugin to handle multiple timers? I'm looking for > something which can set variables in regular intervals or issue > one-shot events (e.g. timeout). The timers must be cancel-able, i.e. > this is for a function library and the caller must not know about this > or interfere with the timers used by a caller. > > Ced > -- > Cedric Blancher > Institute Pasteur > ___ > ast-users mailing list > ast-users@lists.research.att.com > http://lists.research.att.com/mailman/listinfo/ast-users -- , __ , { \/`o;-Olga Kryzhanovska -;o`\/ } .'-/`-/ olga.kryzhanov...@gmail.com \-`\-'. `'-..-| / http://twitter.com/fleyta \ |-..-'` /\/\ Solaris/BSD//C/C++ programmer /\/\ `--` `--` ___ ast-users mailing list ast-users@lists.research.att.com http://lists.research.att.com/mailman/listinfo/ast-users
Re: [ast-users] Anyone got /dev/file@ working?
On Fri, 30 Aug 2013 04:33:09 +0200 Cedric Blancher wrote: > On 30 August 2013 04:29, Glenn Fowler wrote: > > > > On Fri, 30 Aug 2013 04:03:57 +0200 Cedric Blancher wrote: > >> On 28 August 2013 16:32, Lionel Cons wrote: > >> > Did anyone got /dev/file@ working in ast-ksh.20130814 or is that > >> > feature broken there? > > > >> This is again broken in ast-ksh.20130829: > >> ksh -c 'redirect {n} >> /home/ced/bin/ksh: /dev/file@sync/etc: cannot open [No such file or > >> directory] > > > > the feature is there > > the spelling is different > > the original spelling was in a non-release patch proposal > > current spelling is as follows for reasons already posted > > > > /dev/file/sync:etc # relative > > /dev/file/sync:/etc # absolute > Well, I did like /dev/file@options/ because it was clear where the > options are. It looked familiar and user-friendly. Sounds like I have > to get "used" to the new Windows-like style how about this to meet in the middle /dev/file/flag[,flag...]@relative-path /dev/file/flag[,flag...]@/absolute-path recall that the original form only worked on absolute paths and @ in device names seems to only appear in /devices/somename/*@* I also forgot about ':' clashing with the unix ':' path list separator char because I didn't think about /dev/... in $PATH, but why not? ___ ast-users mailing list ast-users@lists.research.att.com http://lists.research.att.com/mailman/listinfo/ast-users
[ast-users] Weird .sh.name and .sh.subscript values for multidimensional arrays
Latest (sh (AT&T Research) 93v- 2013-08-27) ksh crashes if I explicitly unset a variable with unset(1) which contains a multidimensional array: ksh -c 'compound c;typeset -a c.a ; function c.a.unset { printf "%s,%s\n" "${.sh.name}" "${.sh.subscript}"; } ; (( c.a[3][6][11][20]=7 , c.a[3][6][300][20]=7 )) ; unset c' c.a,3 c.a[3][6],11 Segmentation fault The crash however is not the issue which troubles me. The values of .sh.name and .sh.subscript are: I have two elements in the array and would expect three calls of c.a.unset: 1. .sh.name=c.a, .sh.subscript=[3][6][11][20] 2. .sh.name=c.a, .sh.subscript=[3][6][300][20] 3. .sh.name=c.a, .sh.subscript not set (called to dispose the array object itself) The real values in .sh.name and .sh.subscript when c.a.unset() is called are dubious at best. Tina -- Tina Harriott - Women in Mathematics Contact: tina.harriott.m...@gmail.com ___ ast-users mailing list ast-users@lists.research.att.com http://lists.research.att.com/mailman/listinfo/ast-users
[ast-users] Unset method for multidimensional array crashes ksh
The example below crashes any ksh version I could find, even the latest sh (AT&T Research) 93v- 2013-08-27 function f { typeset -a a ; a.unset() { print unset ; } ; a[3][6][11][20]=7 ; } ; f Tina -- Tina Harriott - Women in Mathematics Contact: tina.harriott.m...@gmail.com ___ ast-users mailing list ast-users@lists.research.att.com http://lists.research.att.com/mailman/listinfo/ast-users