On Wed, Nov 16, 2022 at 09:54:21AM +0100, Leszek Dubiel wrote: > > > I was wondering if there is some "one-liner" that > recofigures pin, something like: > > gpioset -b -msignal --autokill /dev/gpiochip2 7=0 > > or > gpioset -b -msignal --force /dev/gpiochip2 7=0 > > that does these two commands at once: > > pkill -ef "^gpioset .* /dev/gpiochip2 7=[01]$" > gpioset -b -msignal /dev/gpiochip2 7=0 > > Understand that GPIOs are a managed resource, like files, and what you are asking for here is equivalent to a function that would kill whatever process has a file open whenever you write to that file. So, no there isn't. It is really unfortunate that killing the process holding the line is the only viable approach when using the libgpiod tools at the moment, but better solutions to your problem should be available soon. Alternatively you can use, say, the Python bindings to write something that better suits your particular needs. Cheers. Kent.