Code Monkey home page Code Monkey logo

Comments (6)

VR-25 avatar VR-25 commented on July 24, 2024 1

It's really (su -c accd &), not su -c accd &.
While the second also works, exiting the shell may require you to issue exit twice, or press <enter> once before issuing exit.

Note: you must be a regular user - meaning, this doesn't work if you're already root.

$ (su -c accd &)
$ exit

Or

$ su -c accd &
$ <enter>
$ exit

I'm a big fan of lazy typing.
I would add s() { (su -c "$*" &); } to Termux's ~/.bashrc, so that I only need to type s COMMANDS to run (su -c COMMANDS &).

su -c echo 's() { (su -c "$*" &); }' >> /data/data/com.termux/files/home/.bashrc

from acc.

VR-25 avatar VR-25 commented on July 24, 2024

The issue has to do with MagiskSU and double fork : e.g. (sleep 120 &) &. For some reason, this doesn't behave entirely as expected.
I'm looking for workarounds.

It's important to note that double fork works as expected on a nonroot shell.

Thanks

from acc.

elem089 avatar elem089 commented on July 24, 2024

most probably you're aware: still the same with V 201907180

from acc.

VR-25 avatar VR-25 commented on July 24, 2024

Yes, the issue persists.
Here's a workaround I figured out: (su -c accd &)

P.S., we really shouldn't have this issue. Perhaps something is wrong with MagiskSU.

from acc.

elem089 avatar elem089 commented on July 24, 2024

I'm sorry, but I don't get it: what is accd & supposed to do? Do I need the brackets?
When I run it simply in su mode, accd & just returns a number like
[1] 28446
Then if I hit ENTER again response is
[1] + Done \accd
Just entering (su -c accd &) or su -c accd & doesn't seem to do anything, at least I don't see any reaction.
And: I prefer to enter su mode alltogether, i.e. not using su -c with each command (being lazy, that's less typing)

from acc.

elem089 avatar elem089 commented on July 24, 2024

Alright, I'll try that next time
UPDATE:
ok, I got the thing with the brackets around (su -c ).
But my main question here was: what's accd & supposed to do in the first place? Can't find any reference in README.MD or somewhere else
If I use the variant with the brackets as in (su -c accd &) there's no visible result in my terminal window.
If I enter it without the brackets I get something like this:

amami:/ $ su -c accd &
[1] 8841

Then if I hit after that I get

[1] + Stopped (tty output) \su -c accd
amami:/ $

If this is getting too far for a github discussion please give me hint like "look it up at ..."
Thx for your patience
UPDATE 2: guess I found it, just remembered my googling skills and found this (among others)

from acc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.