Kerb@discuss.tchncs.de to Programmer Humor@programming.dev · 1 year agoways to close vimdiscuss.tchncs.deimagemessage-square24fedilinkarrow-up122arrow-down13
arrow-up119arrow-down1imageways to close vimdiscuss.tchncs.deKerb@discuss.tchncs.de to Programmer Humor@programming.dev · 1 year agomessage-square24fedilink
minus-squareEufalconimorph@discuss.tchncs.delinkfedilinkarrow-up0·1 year agocat /dev/zero > "/proc/$(pidof vim)/mem" is my favorite dumb way. Clear its memory, wait for the segfault.
minus-squarevrkr@programming.devlinkfedilinkarrow-up1·edit-21 year ago dumb way. Get fancy, add progress bar: pv < /dev/zero > “/proc/$(pidof vim)/mem”
minus-squareJulian@lemm.eelinkfedilinkarrow-up0·1 year ago…you can write to program memory? Idk how exactly but that feels like a security risk.
minus-squarenintendiator@feddit.cllinkfedilinkarrow-up0·1 year agoIt’s your process, why shouldn’t you be able to write to it? Vi is certainly doing it…
minus-squareEufalconimorph@discuss.tchncs.delinkfedilinkarrow-up2·1 year agoYou do need to be root to do it to arbitrary processes.
cat /dev/zero > "/proc/$(pidof vim)/mem"
is my favorite dumb way. Clear its memory, wait for the segfault.Get fancy, add progress bar: pv < /dev/zero > “/proc/$(pidof vim)/mem”
…you can write to program memory? Idk how exactly but that feels like a security risk.
It’s your process, why shouldn’t you be able to write to it? Vi is certainly doing it…
You do need to be root to do it to arbitrary processes.