- Subject: [slang-users] Re: need to send signals two times
- From: Jörg Sommer <joerg@xxxxxxxxxxxx>
- Date: Sun, 29 Apr 2007 11:47:45 +0000 (UTC)
Hallo John,
"John E. Davis" <davis@xxxxxxxxxxxxx> wrote:
> =?UTF-8?Q?J=C3=B6rg?= Sommer <joerg@xxxxxxxxxxxx> 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)
[2007 date index]
[2007 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]