[slang-users] Re: need to send signals two times
Jörg Sommer
joerg at alea.gnuu.de
Sun Apr 29 07:47:45 EDT 2007
Hallo John,
"John E. Davis" <davis at space.mit.edu> wrote:
> =?UTF-8?Q?J=C3=B6rg?= Sommer <joerg at alea.gnuu.de> wrote:
>>run it with slsh /tmp/test.sl and hit ^C. At me, I have to hit a second
>>time ^C to get the output âgot signal 2â.
>
> The problem is that the "signal" intrinsic established the signal in
> such a way that system calls were restarted. When the signal fired,
> the handler implicitly set the signal disposition to interrupt the
> system call. This is why the second ^C caused the fopen to be
> interrupted. In any case, the latest version in the svn repository
> corrects this behavior by setting the disposition to always interrupt
> system calls.
Does jed (and jed-script) suffer from the same problem? This explains,
why my process doesn't read and quit. I think the return from fopen() and
the SIGHUP happen nearly at the same time or the return from fopen() a
little bit before. So the fopen() is suspended again, but nobody ever
does open the pipe.
> Incidently, you might find it interesting to compare the slsh version
> with the corresponding C version, which is appended below.
Do you mean the C code look nearly the same as the SLang code?
Bye, Jörg.
--
Macht besitzen und nicht ausüben ist wahre Größe.
(Friedl Beutelrock)
More information about the slang-users-l
mailing list