Julian Elischer wrote:

> At this time I have no information on any apps that fail to work (that did
> work before KSE).
> The signal flakiness is still present but at least people can get work
> done. I will work on this next (though signal experts are welcome to
> try their hand as well.. (in fact any beginners who want to jump inat the 
> deep end of the pool can guarantee a near-drowning-experience by trying
> to understand signals).

Some news:  syscall restart after signals is broken.  This is responsible
for a lot of the ^Z/fg problems as well as some applications failing when
their timer signals cause IO problems.

Test case:
peter@overcee[12:49pm]~-125> cat restart.sh
#! /tmp/44sh
echo -n "Type something: "
read foo
echo "You typed: \"$foo\""
peter@overcee[12:49pm]~-126> ./restart.sh 
Type something: foo
You typed: "foo"
peter@overcee[12:49pm]~-127> ktrace ./restart.sh 
Type something: ^Z
[1]  + Suspended                     ktrace ./restart.sh
peter@overcee[12:49pm]~-128> fg
ktrace ./restart.sh
You typed: ""
peter@overcee[12:49pm]~-129> kdump -R
  1091 44sh     0.000061 CALL  write(0x1,0x80c4000,0x10)
  1091 44sh     0.000029 GIO   fd 1 wrote 16 bytes
       "Type something: "
  1091 44sh     0.000198 RET   write 16/0x10
  1091 44sh     0.000187 CALL  read(0,0xbfbff2f3,0x1)
  1091 44sh     3.054434 RET   read -1 errno 4 Interrupted system call
  1091 44sh     0.000695 CALL  write(0x1,0x80c4000,0xe)
  1091 44sh     0.000025 GIO   fd 1 wrote 14 bytes
       "You typed: ""
  1091 44sh     0.000254 RET   write 14/0xe

The errno 4 - interrupted system call should not happen.  read returns
ERESTART internally on the signal catch, and the syscall() function in trap.c
is supposed to back up the eip which causes the syscall to be rerun.

I have not looked at the code yet.  This is responsible for things like
vipw failing after ^Z/fg (editor=vi), mergemaster failing on ^Z/fg etc.
(it was mergemaster that tipped me off on this.)

Applications that use interval timers would be suffering from this pretty

"All of this is for nothing if we don't go to the stars" - JMS/B5

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to