Skip to content

lockfile_wrapper: interpreter #1

Description

@Mizzrym

If you wrap multiple scripts invoked by an intepreter, the wrapper script will behave stupid.
For example:

lockfile_wrapper.sh /usr/bin/php some_script1.php
lockfile_wrapper.sh /usr/bin/php some_script2.php

will use the same lockfile for both scripts because it just uses the basename of the command, which is "/usr/bin/php" to identify the wrapped command.

To fix this issue, i intend to hash all command line arguments and write that hash into the filename.
To workaround this issue, you can change the lockfile as parameter

lockfile_wrapper.sh /usr/bin/php some_script1.php
lockfile_wrapper.sh /usr/bin/php some_script2.php -l /tmp/wrapper_some_script2.lock -o /tmp/wrapper_some_script2.out

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions