help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: case of printf >fifo hang in int trap


From: Alex fxmbsw7 Ratchev
Subject: Re: case of printf >fifo hang in int trap
Date: Mon, 14 Feb 2022 23:09:43 +0100

On Mon, Feb 14, 2022 at 10:37 PM Chet Ramey <chet.ramey@case.edu> wrote:

> On 2/13/22 1:33 PM, Alex fxmbsw7 Ratchev wrote:
> > it hangs, further control-c dont take action, control-z maybe in scripts
> in
> > interactive not
> > so i have, mkfifo fifo ; trap 'printf nowork>fifo' int, it hangs on it,
> in
> > interactive the whole even makes all three key combos i know nowork,
> > control c and z and \
> >
> > test:
> >
> > mkfifo ${a:=/tmp/afifo}
> > trap 'printf hang >$a' int
> >
> > first control-c is run, the rest is hanging, displaying ^C and ^\ and ^Z
> > but nothing happens
>
> OK. What do you expect to happen?
>

it just looked me faulty that i couldnt do anymore this bash session till
kill
ah well design flaw =))

>
> The second SIGINT interrupts the open that gets run by the trap handler
> for the first SIGINT (which hangs until someone opens the FIFO for
> reading), but the signal remains trapped. You're just going to keep
> trying to open the FIFO and write something to it every time you hit ^C,
> which seems fairly pointless.
>
> The SIGQUIT is always ignored.
>
> There's no external process created, so the SIGTSTP has no effect.
>
> In fact, the whole exercise, starting with trying to open a FIFO from a
> trap handler without opening it for reading, seems pointless or worse.
>

i see thank you for your valuable opinion.. it seems me like an unknown
design flaw in my stuff
i was just testing and thinkering around


> --
> ``The lyf so short, the craft so long to lerne.'' - Chaucer
>                  ``Ars longa, vita brevis'' - Hippocrates
> Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/


thank you, byyeee'


reply via email to

[Prev in Thread] Current Thread [Next in Thread]