Comment 5 for bug 1185866

Revision history for this message
Daniel Pielmeier (daniel-pielmeier) wrote :

It looks like only adding /usr/bin/nohup in front of /usr/bin/hp-config_usb_printer does not fix the problem. I wonder if this is required at all. Simply backgrounding the process should be enough.

The provided patch did use nohup, redirected stderr to a file and backgrounded the command. I guess you did notice the syntax error when using 'if [ something ]; then blob; else blub &; fi' and removed the ampersand which backgrounded the job, this however did not fix the issue.

There are two possible solutions instead of removing the ampersand. First remove the semicolon as the ampersand already works as a separator 'if [ something ]; then blob; else blub & fi' or use the semicolon and background the complete if-then-else clause 'if [ something ]; then blob; else blub ; fi &'

If you want to use nohup the complete output should be redirected to protect it from hanging if hp-config_usb_printer sends or receives in/output for example 'if [ something ]; then blob; else blub >/dev/null 2>&1 </dev/null & fi'