martymac / fpart

Sort files and pack them into partitions
https://www.fpart.org/
BSD 2-Clause "Simplified" License
230 stars 39 forks source link

fpsync: job control error running under cron #51

Closed JamesDarcy616 closed 11 months ago

JamesDarcy616 commented 11 months ago

Hi Ganael

Is there any way to fix job control warnings when running under cron where there is no tty? My output is filled with errors like these:

/usr/local/bin/fpsync: 1531: set: can't access tty; job control turned off

one for each partition when set -m is called. fpsync seems to work still but the output is hard to see amidst the error spam.

Thanks

James

martymac commented 11 months ago

Hello James,

This is probably related to issue #43. See also :

https://patchwork.kernel.org/project/dash/patch/dedaa3fa370ea9c4aeb1771b5568a7bef4065b04.1675113321.git.steffen@sdaoden.eu/

Have you tried running fpsync with another shell (e.g. Bash) ?

JamesDarcy616 commented 11 months ago

The crontab already had SHELL=/bin/bash so I changed fpsync's shebang to use bash not sh and that's fixed it.

Thank you :)

martymac commented 11 months ago

You're welcome :)