slang-users mailing list

[2007 Date Index] [2007 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

[slang-users] Re: need to send signals two times


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]