[Resend to opensolaris-discuss too.]

Hi!

Yesterday while debugging a shell script I think I may have found a bug
in ksh93 from sNV b124.

The script is basically checking a large list of DNS hostnames for ones
that already end in a '.'. I've boiled it down to a simpler test case:

while true; do if ! echo gretsch-p21-396 | grep '\.$'; then true; else
echo false; fi; done

If I run the above line at the shell prompt, for a long period of time I
get no ouput at all, which is to be expected. However, pretty regularly
rhe shell will be 'stopped' (as if I'd hit CTRL-Z) and I'll be returned
to my login shell.

If I continue the test by typing 'fg', then eventually, that 'if'
statement will actually echo 'false' to stdout. In my original script
that was having issues, I only ever saw the 'if' take the wrong path,
and I never saw this 'Stopped' problem. What could cause the system to
send 'SIGSTOP' to the ksh93 process?

Here is a sample:

>while true; do if ! echo gretsch-p21-396 | grep '\.$'; then true; else echo false; fi; done
[1]+  Stopped                 ksh93
37>fg
ksh93
false

[1]+  Stopped                 ksh93
38>fg
ksh93

[1]+  Stopped                 ksh93
39>fg
ksh93

[1]+  Stopped                 ksh93
40>fg
ksh93

[1]+  Stopped                 ksh93
41>fg
ksh93

[1]+  Stopped                 ksh93
42>fg
ksh93

[1]+  Stopped                 ksh93
43>
Is it me, or is this wierd?

-Kyle



_______________________________________________
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org

Reply via email to