Hello David Korn:
  thanks for your answers.
  but it is still not clear to me now.


  1. you said  with job control(the ksh I am using in Solaris 10 now should be 
the one with job control, right?), a.out program runs in a separate process 
group. but from the result:
-bash-3.00>$ps -ef | grep a.out
   wanjm  8384  8383   0 09:43:31 pts/2       0:00 ./a.out
   wanjm  8386  7257   0 09:43:36 pts/3       0:00 grep a.out
-bash-3.00>$ps -j -p 8384
   PID  PGID   SID TTY         TIME CMD
  8384  8383  7250 pts/2       0:00 a.out
-bash-3.00>$ptree 8384
377   /usr/lib/inet/inetd start
  7247  /usr/sbin/in.telnetd
    7250  -bash
[i]      8383  /usr/bin/ksh ./sigint.sh[/i]
        8384  ./a.out
-bash-3.00>$ps -j -p 8383
   PID  PGID   SID TTY         TIME CMD
  8383  8383  7250 pts/2       0:00 sigint.sh

it seems that both sigint.sh(/usr/bin/ksh ./sigint.sh) & a.out are in the same 
process gourp(PGID 8383).


2. how does shell know the shell know the program is termited with SIGINT or 
QUIT from exit value.

3. int your answer there is "The standard says that an interrupt handler for 
INT that exits should first unset the signal handler and then send itself the 
INT signal after doing the cleanup."
how to realize this, could you please give an small example?

thanks.
-- 
This message posted from opensolaris.org

Reply via email to