这是indexloc提供的服务,不要输入任何密码
Skip to content

Issue with daemonize and runsvdir on Android 7 #614

@Neo-Oli

Description

@Neo-Oli

On Android 7, When running the following daemonize command runsvdir will fail.
daemonize -l $PREFIX/var/run/runsvdir.lock -p $PREFIX/var/run/runsvdir.pid $PREFIX/bin/applets/runsvdir /data/data/com.termux/files/home/.sv

Checking the logs reveals the following problem:

$ daemonize -vo ~/output -e ~/error -l $PREFIX/var/run/runsvdir.lock -p $PREFIX/var/run/runsvdir.pid $PREFIX/bin/applets/runsvdir /data/data/com.termux/files/home/.sv
$ cat error
runsvdir: /data/data/com.termux/files/home/.sv: fatal: can't open current directory: Permission denied

After a lot of testing I finally figured out the problem: Everything daemonize executes is run from the / directory (that's why it needs absolute paths). Starting with Android 7 / no longer has read permissions.

$ ls /
ls: cannot open directory '/': Permission denied

runsvdir, for some reason, needs read access to the current working directory.

Workaround

Specifing the working directory for daemonize fixes the problem
daemonize -c $PREFIX -l $PREFIX/var/run/runsvdir.lock -p $PREFIX/var/run/runsvdir.pid $PREFIX/bin/applets/runsvdir /data/data/com.termux/files/home/.sv

Perhaps daemonize could be patched to set the default working directory to $PREFIX

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug reportSomething is not working properlyinformationInformational post

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions