[prev in list] [next in list] [prev in thread] [next in thread]
List: ast-developers
Subject: [ast-developers] [ast-users] SIGINT not ignored during running job
From: werner () suse ! de (Dr ! Werner Fink)
Date: 2007-11-16 9:54:57
Message-ID: 20071109114937.GA23523 () boole ! suse ! de
[Download RAW message or body]
Hi,
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.
To make this work correct with the ksh the scriptlet above
becomes
#!/bin/ksh
echo starting ./testsig
trap '' SIGINT
./testsig
trap - SIGINT
echo ending
... but why isn't that done by the ksh its self? Both ksh
scriplets can be called on the command line and interrupted
by Ctrl-C to send SIGINT from the keyboard. The first scriplet
ends and the ./testsig job runs in background, the second
scriplet ignores SIGINT.
Could it be that the flag set in shtab_signals[] for SIGINT is
missing the SH_SIGDONE bit? But even if added I do not see
how the signal could be suppressed in sh_fault() without
modifying the code.
Werner
--
Dr. Werner Fink <werner@suse.de>
SuSE LINUX Products GmbH, Maxfeldstrasse 5, Nuernberg, Germany
GF: Markus Rex, HRB 16746 (AG Nuernberg)
phone: +49-911-740-53-0, fax: +49-911-3206727, www.opensuse.org
------------------------------------------------------------------
"Having a smoking section in a restaurant is like having
a peeing section in a swimming pool." -- Edward Burr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testsig.c
Type: text/x-c++src
Size: 439 bytes
Desc: not available
Url : https://mailman.research.att.com/pipermail/ast-developers/attachments/20071109/0338400e/testsig.bin
-------------- next part --------------
_______________________________________________
ast-users mailing list
ast-users@research.att.com
https://mailman.research.att.com/mailman/listinfo/ast-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic