It looks like a bug to me. All other shells behave consistently, and the
effect of this behavior is quite serious. There are many applications that do
trap tty signals and which produce serious problems if abandoned by the shell,
with the shell and the app now competing for tty input. A shell wrapper that
invokes an editor, mailer, etc. is liable to cause problems the first time a
tty signal is sent. It shouldn't be neccessary to explictly trap signals to
avoid this situation.
I would imagine that this behavior is covered by some relevant standard.
John
On Tue, Nov 20, 2007 at 12:19:13PM -0700, Jared Hudson wrote:
> Do you think this behavior is a bug in ksh93 or a chosen change in
> features between ksh88 and ksh93?
>
> -
> Jared H. Hudson
> Dedicated Support Engineer
> Novell, Inc.
> [EMAIL PROTECTED]
> 479-283-4677
>
>
> On Wed, 2007-11-14 at 11:47 -0800, John DuBois wrote:
> > On Fri, Nov 09, 2007 at 12:49:37PM +0100, Dr. Werner Fink wrote:
> > > as ksh script like
> > >
> > > #!/bin/ksh
> > > echo starting ./testsig
> > > ./testsig
> > > echo ending
> > >
> > > does not ignore SIGINT but does exit. The bash and also all
> > > bourne shell I know ignores as long the job ./testsig is
> > > running which is that the jon its self receives the SIGINT.
> >
> > I see this problem too, on all of my test platforms (Linux, OS X, and
> > OpenServer).
> >
> > If I run this on any of those OSes:
> >
> > ksh -c "ksh -c \"trap '' INT; sleep 1000\"; print"
> >
> > and send an interrupt, the parent shell exits and leaves the child process
> > hanging around. This happens in ksh93f, o, and r. Using ksh88, bash, sh,
> > or
> > zsh for the outer shell, the interrupt is ignored.
> >
> > ksh88's signal disposition in this test:
> >
> > sig# signal oldmask sigmask
> > 1: 0x8051000 - 1
> > 2: 0x80519b0 - 2
> > 3: ignore - 3
> > 4: 0x8051000 - 4
> > 5: 0x8051000 - 5
> > 6: 0x8051000 - 6
> > 7: 0x8051000 - 7
> > 8: 0x8051000 - 8
> > 10: 0x8051000 - 10
> > 12: 0x8051000 - 12
> > 13: 0x8051000 - 13
> > 14: 0x80519b0 - 14
> > 15: 0x8051000 - 15
> > 16: 0x8051000 - 16
> > 17: 0x8051000 - 17
> > 18: default - 18
> > 20: 0x80519b0 - 20
> > 31: ignore - 31
> >
> > ksh93's signal disposition in the same test:
> >
> > sig# signal oldmask sigmask
> > 18: 0x80567a0 -
> >
> > John
>
--
John DuBois [EMAIL PROTECTED] KC6QKZ/AE
I wish to God these calculations had been executed by steam. - Charles Babbage
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users