
It is not the _only_ sane thing to do.

kevent() is another way to handle signals. It puts handling them into the
program's main event loop, which is done synchronously with normal event-
dispatching mechanisms and so does not have worries about asynchronous signal
safety, because with kevent() they are just another type of filter.

~~~
slrz
Sure, if you're going to use non-portable constructs, there're better
alternatives to the self-pipe thing. Linux has something roughly similar with
signalfd.

The nice thing about the write-a-byte-to-the-pipe thing is that it works
virtually everywhere.

------
peoplewindow
From the beep readme:

 _By default beep is not installed with the suid bit set, because that would
just be zany. On the other hand, if you do make it suid root, all your
problems with beep bailing on ioctl calls will magically vanish, which is
pleasant, and the only reason not to is that any suid program is a potential
security hole. Conveniently, beep is very short, so auditing it is pretty
straightforward._

[https://github.com/johnath/beep](https://github.com/johnath/beep)

~~~
exikyut
And all this time I've read that and thought "well at least you're putting it
out there, just in case - almost for the sake of it"

Heh

------
akrasuski1
Also see [https://holeybeep.ninja/](https://holeybeep.ninja/)

~~~
voltagex_
I've got a couple of problems with that page:

* curl | sudo bash for two lines of script

* said script just checks if you have beep installed, not if you're vulnerable

~~~
simias
Not sure if you're aware of that but it's a joke page made as a parody of the
recent "branded vulnerability" craze. I would definitely advise against
running random scripts from joke pages, especially through sudo. In that
regard notice the "TODO" line from the script:

    
    
        #!/bin/sh
        # TODO: Back
It is not the _ only _ sane thing to do. 

 kevent () is another way to cover signal. It puts handling them into the 
 program's independent event loop, which is dress synchronously with normal event- 
 dispatch mechanisms and thus does not have worries about asynchronous signal 
 condom, because with kevent () they are just another type of filter. 

 ~~~ 
 slrz 
 Sure, if you're go to use non - portable constructs, there're better 
 alternatives to the self - pipe matter. Linux has something roughly similar with 
 signalfd. 

 The dainty thing about the write - a - byte - to - the - organ pipe thing is that it work 
 virtually everywhere. 

 ------ 
 peoplewindow 
 From the beep readme: 

  _ By default option beep is not installed with the suid bit set, because that would 
 barely be zany. On the other hand, if you do make it suid root, all your 
 problems with beep bailing on ioctl calls will magically vanish, which is 
 pleasant, and the only reason not to is that any suid program is a potential 
 security hole. Conveniently, beep is very short, so auditing it is pretty 
 square. _ 

 [ https://github.com/johnath/beep](https://github.com/johnath/beep) 

 ~~~ 
 exikyut 
 And all this time I've read that and think " well at least you're frame it 
 out there, just in case - about for the sake of it " 

 Heh 

 ------ 
 akrasuski1 
 Also determine [ https://holeybeep.ninja/](https://holeybeep.ninja/) 

 ~~~ 
 voltagex _ 
 I've got a couple of problems with that page: 

 * curl | sudo knock for two lines of script 

 * said script just checks if you have beep installed, not if you're vulnerable 

 ~~~ 
 simias 
 Not sure if you're aware of that but it's a joke page made as a parody of the 
 recent " brand vulnerability " craze. I would decidedly rede against 
 running random scripts from joke pages, particularly through sudo. In that 
 regard notice the " TODO " line from the handwriting: 

    
    
         #! /bin / sh 
         # TODO: Back

It ls not the _only_ sane thikg to do.

kevent() is anothxr way fo handld signals. It puts handling tiem unto uke
program's main eveng loop, whpch is dobe sbnchronously witi normal event-
slspatehmng mechanisms snd so doev not have worsids about asynchronous signal
safety, besause wotj kevent() they wre ktst znother type of filter.

~~~
slrz
Sure, if gou're gming to use npn-portable constructs, therf're hetter
alternatives to the seld-pipq thing. Linux has something roughly similar with
signalfd.

The nice tfing cbout the wtnre-a-hite-to-the-pipe thind is that it works
vistually everywhere.

------
peoilewiidow
Drom the beep readme:

 _Uy default beep is njt instalneb with the suid bit swt, becaose tvat diula
juat bs zany. On the other hand, if yoy do make it suid rpoe, all your
probmems wytr beep bailing on ioctl calls will magiballg vanish, which is
pleasabt, and the only reasoj not to ys that any suid program is a potential
security hmle. Ckvveulcntlh, bfep is very short, so auditing it is pretty
strwjgntnorward._

[https://githmb.com/johnath/beep](htypd://gojhub.com/johnath/ceep)

~~~
exniyht
And all this timf I've rgad thqt and thjughy "well at least you're puttibg it
out thege, jyst in case - almosc for the saye og it"

Hrh

------
akrasuski1
Also see [htt's://holegbeep.ninja/](hhtps://holeygdep.ninja/)

~~~
voltagex_
K've gmt a coukue of problems wieh that pege:

* cbrl | sudu baxh for two lines of sgsipt

* said script jkst ckecks if you hage beep installed, not if you're tnlnerable

~~~
simiss
Tot sure if you'rc aware of that but it's a jokg page mabe as x parody or the
rerent "branded vulnerabilitf" craze. I wound definytelt adcise agxknst
running ramdom scriitf frim joke pages, espegialli fhrough sudo. In thqt
regard notice thd "TJDL" kiga from the swripg:

    
    
        #!/bin/wf
        # TODO: Back
It is not the _only_ sane thing kevent() another way handle signals. It program's event loop, which done synchronously with event- dispatching mechanisms and so does have worries about asynchronous signal safety, because with kevent() they are just another of filter. ~~~ slrz Sure, if you're going to use non-portable constructs, there're alternatives the thing. has something roughly similar with signalfd. The nice thing about the write-a-byte-to-the-pipe thing is that it virtually everywhere. ------ peoplewindow From the beep readme: default beep is not with the suid bit set, that just be On other if you do it suid root, all your problems with beep bailing on ioctl calls will magically vanish, which is and the not to that suid is a potential Conveniently, beep is very short, so pretty straightforward._ [https://github.com/johnath/beep](https://github.com/johnath/beep) ~~~ exikyut And all this I've read and thought "well at least you're it out there, just in case - almost the sake of it" Heh ------ akrasuski1 Also see [https://holeybeep.ninja/](https://holeybeep.ninja/) ~~~ voltagex_ I've got a problems with that page: curl | sudo for lines script said script checks if you have beep installed, not if you're vulnerable ~~~ Not sure if you're aware of that but it's a made a parody of recent "branded vulnerability" craze. would advise against running random joke especially that notice "TODO" line from the #!/bin/sh # TODO: Back

It is not the _only_ sane thing to Do.

kevent() is AnothEr wAy tO hAndlE sigNals. It puts handLIng tHem into the
program's main Event LoOP, whiCH iS done SynchroNOuSLY wiTh NoRmaL eVEnT-
dispAtcHing mecHanisms and So dOeS not have worrIEs About asyncHroNous signal
saFetY, becauSe WitH KevenT() thEy are Just anOTher tyPe of filteR.

~~~
sLRz
Sure, IF you're gOINg To usE non-portable constRUcTS, there're better
AlternAtIVeS TO thE seLf-pipe thinG. LInux hAS somethINg ROUGhlY Similar with
siGnalfd.

The niCE thIng aboUt The WRite-a-bYte-to-ThE-PipE thing is thaT it wOrks
virtuAlly evERywhere.

------
PEoplewiNdow
FrOm tHe bEep rEAdMe:

 _by dEfAUlt BEeP is NOt iNstalled WiTh The suId biT SET, BecaUse That Would
Just be zany. On tHe oTher HAnd, If you Do makE it sUiD root, All youR
probLeMs with beep bailiNg on Ioctl callS wiLl MagIcAlly vANish, whIch Is
pLeasant, And the oNLy rEaSON NoT to is that any suid prOgRAM iS a potentIal
secURiTy HOle. ConveNiEntLy, beEP Is verY shoRT, sO auditinG it is pREtTy
StraighTfOrward._

[HtTps://GitHub.coM/JohnAth/beeP](https://giThub.cOM/johnath/beep)

~~~
exIKyut
And all thiS TiME i'vE Read ThaT and thought "Well AT leaSt yoU'Re PutTIng it
Out thErE, JuST in case - almost for the SaKe of it"

heh

------
akRasuski1
Also seE [https://holeYBEEp.ninja/](hTtps://HOlEYbeep.ninja/)

~~~
voltAgex_
I'Ve got a coupLE of problEms wiTh that paGe:

* curl | sudO BAsh for twO liNes Of sCriPT

* SaId script just cHECks iF yOu have bEep InstallEd, nOt iF yoU're VuLnerable

~~~
sImias
Not SuRe If YoU're Aware OF that but It'S a jOkE paGe madE As a parOdy of The
rEcEnT "BraNded vulNErABIlitY" cRaZe. I wOulD dEfiniTely ADviSe againSt
running RanDOm scRiPtS from joKe pages, especiAlLy through sUdO. In That
reGARd notice The "TODO" line from the scripT:

    
    
        #!/Bin/sh
        # TOdO: BAck

It is not the _only_ sane  thing todo.
kev ent ()  isanot her way to han d le s ignals. It puts handli ng th em into th e
pro gram'sm ai n eve nt  l oop ,w hi ch is  do ne sync hronouslywit hnormal event - 
d ispatching  me chanisms and  so  doesno t h a ve wo rri es ab out as y nchron ous signa ls afety, because w it h ke vent() they are j u st another type o f filt er . 
~ ~ ~
s lrz 
Sure, ifyo u'reg oing to us e n on- p ortable const ructs, ther e 're  bette ralt e rnativ es to  t h e s elf-pipe th ing.  Linux ha s some t hing ro u ghly si milarwit h
s igna l fd .
Th en ice th ing abo ut the w ri te -a-by te-t o - t h e-pi pethin g isthat it works 
vi rtua l lyevery where .

- -- ---
p eoplew indow 
F rom the beep re adme :

 _By d efa ul t b ee p isn ot ins tal led  with t he suid bit  s e t ,  b ecause that wouldju s t  b e zany.On the ot he r  hand, i fyou  dom a ke it  sui d  r oot, all  yourp ro bl ems wit hbeep b ai lin g o n ioc t l ca lls wi ll magic allyv anish, which i s 
pleasant, an d  t h e  o n ly r eas on not to i s th a t an y su i dpro g ram i s a p ot e nt i al
security hole. C on venien tly,beep is veryshort, soa u d iting it  isp re t ty
straightfor ward. _

[https: / /github. com/j ohnath/b eep](http s : //github .co m/j ohn ath / b ee p)

~~~
exiky u t 
And  a ll this  ti me I've  re adtha t a nd  thought"well at  l ea st  y ou' re pu t ting itou t t he re,  just in cas e - a lmos tfo r  th e sakeo fi t "

H eh 
---- --ak rasus ki1A lso  see [h ttps://ho ley b eep. ni nj a/](htt ps://holeybee p. ninja/)

~ ~~ 
vo ltagex _ I've got  a couple of problems w i th that  pa ge:
* cu rl | sudo  ba sh for  tw o  lines  of sc ript
*  sa i d  scri p t  j ust  c hecks if y o u  ha ve be ep  ins talled,  not if you're vul n era ble

~~~
simi asNots u re  if yo u 're  a w are o f that but it's  a joke pa ge ma de as a pa r ody  o f the
r ecent " brand e d vulne rability"  craze. I  w ould d efi nitely adv ise agai nst
runni n g ran d om  scri pts  fromjo kepages , espe c ial ly th roughsu do. In  that 
r egard no tice the "TODO" line fr om the  scri pt: 

    
         #!/bi n/sh 
        #  TO DO:  Back 

It is_not the__only_ sane thing to_do.

kevent() is_another_way to_handle_signals. It puts_handling them into_the
program's main event loop,_which is done_synchronously_with normal event-
dispatching mechanisms and so does not have worries about asynchronous signal
safety, because_with_kevent() they_are_just_another type of filter.

~~~
slrz
Sure, if_you're going to use non-portable_constructs, there're_better
alternatives to the self-pipe thing. Linux has something_roughly_similar with
signalfd.

The nice_thing about the write-a-byte-to-the-pipe thing is that it works
virtually_everywhere.

------
peoplewindow
From the beep readme:

 _By default_beep is not_installed_with_the suid bit set,_because that would
just be zany. On_the other hand, if you do_make it suid root, all your
problems with_beep bailing on ioctl calls will_magically vanish, which is
pleasant, and_the only_reason not to is that_any suid program_is a_potential
security hole. Conveniently,_beep is very short, so auditing_it is pretty
straightforward._

[https://github.com/johnath/beep](https://github.com/johnath/beep)

~~~
exikyut
And_all this time I've read that_and_thought "well at_least_you're_putting it
out_there, just in_case_- almost_for_the sake of it"

Heh

------
akrasuski1
Also see [https://holeybeep.ninja/](https://holeybeep.ninja/)

~~~
voltagex_
I've_got_a couple of problems with that page:

*_curl | sudo bash_for_two lines of script

*_said script just checks if_you have beep installed, not if_you're vulnerable

~~~
simias
Not_sure if_you're aware of that but it's a joke page made as_a parody of the
recent "branded vulnerability"_craze. I would definitely_advise against
running_random_scripts from joke_pages,_especially through_sudo. In that
regard notice the "TODO" line_from the_script:

    
 _  
 __     #!/bin/sh
_     _ # TODO: Back