-
Notifications
You must be signed in to change notification settings - Fork 153
Common Pitfalls and Debugging
Try to run the command without adding it to Pueue.
Do this by calling sh -c '$COMMAND' instead of pueue add '$COMMAND'.
If this fails, it's not a problem with Pueue, but the command or the shell's features itself.
Some examples of what can go wrong:
- A single
&somewhere in your command detaches the process, causing the Pueue task to finish immediately. - The system shell in Ubuntu 18.04 doesn't support the
&>parameter, which is interpreted as&and detaches processes. Use2>&1instead.
Look at the process output:
This can be done via pueue log $task_id.
You can also get a live view of the output with pueue follow $task_id.
Pueue takes your input and uses it exactly as is to create a new sh -c $command in the background.
If your command contains spaces or characters that need escaping, you might need to encapsulate it as a string:
pueue add -- ls -al "/tmp/this\ is\ a\ test\ directory"Without quotes, the character escaping won't be transferred to the sh -c $command, as it's already removed by calling it from the current shell.
Sometimes processes may wait for user input.
For instance, most package manager wait for some kind of confirmation (y/n).
If this is the case, you can simply send the desired input to the process via the send subcommand:
pueue send "y
"However, this can sometimes be avoided by adding something like a --yes flag to the command, given that such a flag is available.
Pueue doesn't support aliases in your shell's .*rc files, since that's pretty tricky.
That's why Pueue brings it's own aliasing.
Check the miscellaneous section on how to use it.
All programs that require some kind of display/window manager won't work, as the tasks are executed in the background.
Don't use Pueue for commands that won't work in a non-visual environment.
Due design differences between Windows and Linux, pueued --daemonize may not work as expected on Windows*, including but not limited to the following quirks.
- The daemon may still exit if you close the terminal.*
- If
pueue followin the same shell wherepueuedis spawned, then Ctrl+C may also shut down the daemon.*
* These are fixed in 4.0+ See #344 for more info.